If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > MailFormat - Server.CreateObject Failed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-03, 13:31
Bigced_21 Bigced_21 is offline
Registered User
 
Join Date: Dec 2002
Location: KY
Posts: 54
MailFormat - Server.CreateObject Failed

Can anybody tell me why I'm getting this error:
Server.CreateObject Failed
The error is taking place @

Dim mailObj
Set mailObj = Server.CreateObject("CDONTS.NewMail")
With mailObj
.From = strFrom
.To = strTo
.Subject = strSubject
.Body = strBody
.Send
End With

Set mailObj=nothing

here's the complete code, besides the HTML that I cut out.
<%
strFrom = Request.Form("from")

strTo = "somebody@hotmail.com"

strSubject = "Licensing Problem!"

strBody = "This problem has been submitted on " & Now() & "." & vbCrLF & vbCrLF

strBody = strBody & "Name: " & Request.Form("name") & " (Phone Num. " & Request.Form("phone_num") & ")" & vbCrLF & vbCrLF

strBody = strBody & "Issue/Problem: " & vbCrLf & Request.Form("problem") & vbCrLF

'New Code
Dim mailObj
Set mailObj = Server.CreateObject("CDONTS.NewMail")
With mailObj
.From = strFrom
.To = strTo
.Subject = strSubject
.Body = strBody
.Send
End With

Set mailObj=nothing

%>
Reply With Quote
  #2 (permalink)  
Old 08-04-03, 21:13
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
You might try switching from CDONTS (which is being phased out) to the newer CDO such as can be seen in the E-mail Attachment example at http://www.asp101.com/samples
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #3 (permalink)  
Old 08-06-03, 05:08
aliayen aliayen is offline
Registered User
 
Join Date: Aug 2003
Location: Kayseri-Turkiye
Posts: 7
CDONTS component may be uninstalled, or you may be using an operationg system that does not support CDONTS because CDONTS is Collobrated Data Objects for WINDOWS NT. This means that you cannot use it on an Win 9x system.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On