CDONTS.Send w URL in Body

R

Ray at

Is that really all that's different? Can you show your code? Any SMTP
events in any event logs on the server? And bad mail in the badmail
directory? Are you on an NT server? If not, have you tried using CDO
instead of CDONTS?

Ray at work
 
M

Mario Leduc

Here is the code
Dim rqEmail, rqSubject, rqBody, interface
rqEmail = Request.Form("email")
rqSubject = Request.Form("subject")
rqBody = Request.Form("body")
rqInterface = Request.Form("interface")

rqBody = rqBody & vbCRLF & vbCRLF & vbCRLF & "<site1>"

Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")

objMail.From = rqEmail
objMail.To = "(e-mail address removed)"
objMail.Subject = rqSubject
objMail.MailFormat = 1
objMail.BodyFormat = 1
objMail.Body = rqBody

On error resume next
objMail.Send
Set objMail = nothing

If rqInterface = "2" Then
Response.Redirect("/contactus/thanks_f.asp")
Else
Response.Redirect("/contactus/thanks_e.asp")
End If

Whats the diference between CDO and CDONTS anyway?

Thanks
 
R

Ray at

Where does the IP address come from?



Try this modified version for debugging purposes:


Dim rqEmail, rqSubject, rqBody, interface
rqEmail = Request.Form("email")
rqSubject = Request.Form("subject")
rqBody = Request.Form("body")
rqInterface = Request.Form("interface")

rqBody = rqBody & vbCRLF & vbCRLF & vbCRLF & "<site1>"

RESPONSE.WRITE "EMAIL: " & rqEmail & "<hr>"
RESPONSE.WRITE "SUBJECT: " & rsSubject & "<hr>"
RESPONSE.WRITE "BODY: " & rqBody & "<hr>"


Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")

objMail.From = rqEmail
objMail.To = "(e-mail address removed)"
objMail.Subject = rqSubject
objMail.MailFormat = 1
objMail.BodyFormat = 1
objMail.Body = rqBody

'' On error resume next THIS IS COMMENTED OUT, SINCE YOU'RE DEBUGGING...
objMail.Send
Set objMail = nothing

RESPONSE.END

If rqInterface = "2" Then
Response.Redirect("/contactus/thanks_f.asp")
Else
Response.Redirect("/contactus/thanks_e.asp")
End If


What's rq?
Whats the diference between CDO and CDONTS anyway?

CDONTS = old technology
CDO = new technology

See here:
http://www.aspfaq.com/show.asp?id=2026
And if you miss the link, also see here:
http://support.microsoft.com/?kbid=810702

Ray at work
 
M

Mario Leduc

I converted to CDO still not working when I put something like this in the
body
http://192.168.0.2/

but if I put http://www.domain.com/ it worked?

Here is the code

Dim rqEmail, rqSubject, rqBody, interface
rqEmail = Request.Form("email")
rqSubject = Request.Form("subject")
rqBody = Request.Form("body")
rqInterface = Request.Form("interface")

rqBody = rqBody & vbCRLF & vbCRLF & vbCRLF & "<site1>"

Response.Write "Email = " & rqEmail & "<BR>"
Response.Write "Subject = " & rqSubject & "<BR>"
Response.Write "Body = " & rqBody & "<BR>"

Dim cdoMessage
Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
.From = rqEmail
.To = "(e-mail address removed)"
.Subject = rqSubject
.TextBody = rqBody
.Send
End With

Set cdoMessage = Nothing

rq stands for request
only for differentiate from body
 
R

Ray at

Any SMTP
events in any event logs on the server? And bad mail in the badmail
directory?

Try this modified version for debugging purposes:


Dim rqEmail, rqSubject, rqBody, interface
rqEmail = Request.Form("email")
rqSubject = Request.Form("subject")
rqBody = Request.Form("body")
rqInterface = Request.Form("interface")

rqBody = rqBody & vbCRLF & vbCRLF & vbCRLF & "<site1>"

RESPONSE.WRITE "EMAIL: " & rqEmail & "<hr>"
RESPONSE.WRITE "SUBJECT: " & rsSubject & "<hr>"
RESPONSE.WRITE "BODY: " & rqBody & "<hr>"


Dim objMail
Set objMail = CreateObject("CDO.Message")

objMail.From = rqEmail
objMail.To = "(e-mail address removed)"
objMail.Subject = rqSubject
objMail.TextyBody = rqBody

'' On error resume next THIS IS COMMENTED OUT, SINCE YOU'RE DEBUGGING...
objMail.Send
Set objMail = nothing

RESPONSE.END
 
M

Mario Leduc

SMTP event log does not contains any error nor that any badmail in the bad
mail folder

Tried your debug code, can see the body with the http://192.168.0.1/ in the
response.write, but the mail was not sent??

If I put 192.168.0.1 without the http:// it worked??

Is it a bug of CDO??
 
R

Ray at

Is the mail in the pickup directory or the queue directory? I suppose it
could be a bug.

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top