New York Hotel | Vegas Hotel | Finance | Magazine Subscriptions | Forum
asp and CDONTS [Archive] - PCMech Forums

PDA

View Full Version : asp and CDONTS


artsapimp
07-05-2000, 10:03 AM
I am making a page which when the form is submitted it send the information of the form to an email address through CDONTS. The problem I'm having is the body of the email is setup like this:

Name: Art Sapimp Phone#: 407-555-5640 Email: artsapimp@yahoo.com...

instead of like this:

Name: Art Sapimp
Phone#: 407-555-5640
Email: artsapimp@yahoo.com

The code is written in asp format but it's an email so I can't put a [i]& "< br >" &... because it's not html. Here is the code so far.
<font color=0000ff>
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = strName
objNewMail.To = "artsapimp@yahoo.com"
objNewMail.Body = "Name: " & strName & "Phone#: " & strPhone & "Email: " & strEmail

objNewMail.Send
</font>
Thanks for any help.


------------------
If you think an education is expensive...try ignorance.

UncaDanno
07-05-2000, 11:48 AM
If you're using Interdev, you can add "& vbCRLF" where you want to have a carriage return and line feed.

If not, you can use " & chr(30) & chr(10)". vbCRLF translates to " chr(30) & chr(10) "

artsapimp
07-05-2000, 11:57 AM
Perfect, thanks. I have changed it and now my email doesn't get sent at all. I know it's not because of this code but do you see anything wrong in that code above? It did work, maybe it's yahoo's mail service.

------------------
If you think an education is expensive...try ignorance.

UncaDanno
07-06-2000, 03:58 AM
Try taking the crlf out and seeing if the send works. If it does, put the crlf back in and see if it works. If not, take it back out and see if it works.

Just a debugging drill.

If the only change is the addition of the crlf and that keeps the send from working, looks like the mail service doesn't like it.