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

Inserting New lines in text email 1

Status
Not open for further replies.

nphani

Technical User
Feb 10, 2002
104
US
Hi Friends,
I am using CDONTS for emailing and everything is working fine. But I want to send text emails with some information like:
A: xyz
B: pqr
etc etc...
I am able to get the information but am not able to insert new line characters into the text. I am using recordsets for developing the strings. I am trying:
strMail = strMail & "A: xyz" & vbCRLF
What should I use instead of vbCRLF for inserting new lines?

Phani
 
Here is a clip from one of my pages. Works fine for me.

objMail.Body = "ADDRESS: " & Request.Form("Address") & vbcrlf &_
"PHONE: " & Request.Form("Phone") & vbcrlf &_
"EMAIL: " & Request.Form("Email") & vbcrlf

I have noticed that use of rich text format gives varying results due to (I think) the configuration of the client email application.

Jeff
 
yeah I agree with Jeff...all email applications tackle the formatting in different ways.

Another way around it is to make the email html.

Jonny

-------------------------------------------------

 
Or, to make it ANSII complient and portable to most systems, try:
Code:
objMail.Body = "ADDRESS: " & Request.Form("Address") & "\nPHONE: " & Request.Form("Phone") & "\nEMAIL: " & Request.Form("Email") & "\n"

\n = line break
\r = line return
\t = tab

There are some more, but these are the most widely used.

Take Care,
Mike
 
Mike,

Thanks for posting that, I have not seen those before. Where do they come from? Thanks!

nphani,

You might try Chr$(13). Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top