Forums

ASP

This topic is locked

Vbnewline not working in CDONTS

Posted 13 Dec 2006 07:06:57
1
has voted
13 Dec 2006 07:06:57 praveena kante posted:
had tried using Cdonts.session and cdonts.newmail for sending emails in VBscript.The body text of the mail is wrapped.I tried using VbNewline,vbcrlf,chr(10),chr(13) etc. I am not sure when the lines are being wrapped,in some cases all the lines are wrapped.

Heres a sample of my code:
Set objSession = CreateObject("CDONTS.Session"

objSession.LogonSMTP Request.Form("Leader_FullName"

Set objOutbox = objSession.Outbox
Set objMessage = objOutbox.Messages.Add

objMessage.Subject = "SAmple"
objMessage.Text = "Employee Name" & " = " & Request.Form("Employee_FullName" & chr(10) & _
"Employee NET ID" & " = " & Request.Form("Employee_NetID" & chr(10) & _
"Leader Name" & " = " & Request.Form("Leader_FullName" & chr(10) & _
"Leader Phone" & " = " & Request.Form("Leader_Phone" & chr(10) & _
"Business Reason" & " = " & Request.Form("Business_Reason"

objMessage.Recipients.Add "some mail id"
objMessage.Send

can you help me out with the above problem.
Can you suggest the reasons or scenarios where the email text is wrapped.
Thanks in Advance.


praveena

Replies

Replied 18 Dec 2006 17:56:00
18 Dec 2006 17:56:00 Lee Diggins replied:
Hi Praveena

Try using both chr(10) & chr(13) together.

Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>

Reply to this topic