CRLF in body using sendmail?

 
Hello,

I can't seem to get linefeeds in the body of my email using sendmail, here's basically what I'm doing:

string Line1="This is Line 1"+'/r'+'/n';
string Line2="This is Line 2"+'/r'+'/n';
string Body=Line1+Line2
sendmail("TEST",Body);



When I "view source" the email... it just looks like one long line... /r and /n are converted to 10 and 13 (chr$(10) and chr$(13) respectively).

Any chance there is a special character for linefeed built-into the sendmail fuction to accept linefeeds?

Sure would make the email look better. (The ability to send as HTML should be on the wish list)!

All replieds are appreciated.

-charliev

 
Hello,

I can't seem to get linefeeds in the body of my email using sendmail, here's basically what I'm doing:

string Line1="This is Line 1"+'/r'+'/n';
string Line2="This is Line 2"+'/r'+'/n';
string Body=Line1+Line2
sendmail("TEST",Body);



When I "view source" the email... it just looks like one long line... /r and /n are converted to 10 and 13 (chr$(10) and chr$(13) respectively).

Any chance there is a special character for linefeed built-into the sendmail fuction to accept linefeeds?

Sure would make the email look better. (The ability to send as HTML should be on the wish list)!

All replieds are appreciated.

-charliev



I see where I went wrong... the /n just simply needs to be part of the string, not as a literal. So the following code works:

sendmail("This is the subject", "This is line 1/nThis is line 2");



So you end up a message body that looks like the following:

This is line 1
This is line 2

But everyone knew that, right?
-charliev

Reason: