Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to send mail using CDONTS / CDO 1

Status
Not open for further replies.

miq

Programmer
Joined
Apr 24, 2002
Messages
315
Location
PK
hi,

I was able to send mail using cdonts (no error displayed) but couldn't recieve at the email address where it was send.



Here is the code:


<%
option explicit
Dim x
Dim objCDO
Dim txtMessage
For each x in Request.Form
txtMessage = txtMessage & &quot;<br>&quot; & request.form(x)
Next
'response.write txtmessage


'create an instance of the cdonts object
Set objCDO = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
With objCDO
.BodyFormat = 0 'CDOBodyFormatHTML
.MailFormat = 0 'CDOMailFormatMime
'.BodyFormat = 1 'CDOBodyFormatText
'.MailFormat = 1 'CDOMailFormatText
.To = &quot;xxx&hotmail.com&quot;
.From = &quot;yyy@hotmail.com&quot;
'objCDO.cc = &quot;zzz@hotmail.com&quot;
.Subject = &quot;Form Data&quot;
.Body = txtMessage
'set the importance
.Importance = 2 'High importance!
'send the e-mail
.Send
End With

'clean up
Set objCDO = Nothing

response.write &quot;<br>&quot;
response.write &quot;Message Has heen sent&quot;


%>




Is this a problem of IIS not cofigured properly.
What rights should i assign to IUSR_XXXXXXX account including &quot;send As&quot; and Recieve AS&quot; rights.

Also I haven't cofigured default site on IIS just using direct Adressing for web pages. Though i have created virtual directory and placed related documents / images in that directory.

Virtual directory = OS
IE is used to acess pages
A form page is called using address

this form when submitted call's the page having above mentioned code.


bye
 
check if the server is connected to the net, if not see if the mail is in the queue directory.
 
miq,

CDONTS requires that Microsoft SMTP be installed, and that _some_ SMTP server be running. If you're not getting any erros, then MS SMTP is probably installed ok, but it may not actually be running, or configured correctly. When you issue the objCDO.send, CDO dispatches the message to the SMTP server. At that point, its job is done. It is the SMTP server who actually delivers the mail, so I think you want to focus your attention there. If SMTP is having a problem, CDONTS won't know about it, hence you're not getting any error messages.
 
hi,

Great help &quot;rmusgrove&quot;


bye
miq
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top