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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL in Body CDONTS not sending Mail??

Status
Not open for further replies.

mleduc

Programmer
Dec 5, 2001
20
CA
Hi,

I created a asp page that send information from the form to cdonts/email. When I type text in my body form field, the mail is generated and sent. As soon as I put a URL ( CDONTS don't send anything.

Help Please!
 
Here it is
==========================================

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 & &quot;<site1>&quot;


Dim objMail
Set objMail = CreateObject(&quot;CDONTS.NewMail&quot;)

objMail.From = rqEmail
objMail.To = &quot;email@domain.com&quot;
objMail.Subject = rqSubject
objMail.BodyFormat = 1
objMail.Body = rqBody
objMail.MailFormat = 1

On error resume next
objMail.Send
Set objMail = nothing

If rqInterface = &quot;2&quot; Then
Response.Redirect(&quot;/test/thanks_f.asp&quot;)
Else
Response.Redirect(&quot;/test/thanks_e.asp&quot;)
End If
 
Try changing the mail format to html.

objMail.BodyFormat = 0
objMail.MailFormat = 0

Good Luck!

Wow JT that almost looked like you knew what you were doing!
 
not sure if it makes a difference but try this:


objMail.BodyFormat = 1
objMail.MailFormat = 1
objMail.Body = rqBody
 
You mean putting the objMail.MailFormat befor the objMail.Body?

I'll give it a try
 
Does not change still not sending mail
 
I think I found the problem, it looks like using does not work with cdonts, if I put in the body field it works.

Now I am worried that people use numeric url in their message so I wont get them.

Anyone know something about this?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top