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

How to add hard breaks in text email 1

Status
Not open for further replies.

HardCoreCoder

Programmer
Feb 13, 2008
11
0
0
US
How do I add hard breaks when sending text email? I have the code shown below, what do I add to break up the lined in the body of the email?

<%@language="VBScript"%>
<%Option Explicit%>

Dim objMail

Set objMail=CreateObject("CDO.Message")
objMail.Subject=strSubject
objMail.From="mpbarone@aaamichigan.com"
objMail.To="mpbarone@aaamichigan.com"
objMail.TextBody="Message: " & strMsg &_
"Phone: " & strDeptPhone &_
"Perspective: " & strPerspective &_
"Assignment: " & strClassAssignment
objMail.Configuration.Fields.Item (" = 2
objMail.Configuration.Fields.Item (" = "204.78.xxx.242"
objMail.Configuration.Fields.Item (" = 25
objMail.Configuration.Fields.Update
objMail.Send
Set objMail=nothing
 
In a text email, I believe "\r\n" will return a new line. So if you want a blank line, you'd use "\r\n\r\n".

Joe
 
try...

Code:
 objMail.TextBody="Message: " & strMsg [!]& vbCrLf [/!]&_
"Phone: " & strDeptPhone [!]& vbCrLf [/!] &_
"Perspective: " & strPerspective [!]& vbCrLf [/!] &_
"Assignment: " & strClassAssignment

or

Code:
 objMail.TextBody="Message: " & strMsg [!]& "<br />" [/!]&_
"Phone: " & strDeptPhone [!]& "<br />" [/!] &_
"Perspective: " & strPerspective [!]& "<br />" [/!] &_
"Assignment: " & strClassAssignment


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top