Email.strBody


Recommended Posts

Hi,

I am using email2sms service and this service has its own rule to write.

I would like to send an email with the body as followings(3 line):

User: test

To: +90939393999

Text: hi, how are you?

I can not use ENTER after Email.strBody.

I mean, Email.strBody = "User: test To: +90939393999 Text: hi, how are you? " wil not solve my problem, because it writes to only one line.

Is there anything to parse them with ENTER?

thank you.

Link to comment
Share on other sites

You have to add the carriage return / line feed manually:

Email.strBody = "User: test" + chr(13) + chr(10) + "To: +90939393999" + chr(13) + chr(10) + "Text: hi, how are you? "

I typically create a variable for the CR/LF pair instead of putting chr(13) + chr(10) directly in the string:

private string CRLF = chr(13) + chr(10)
Email.strBody = "User: test" + CRLF + "To: +90939393999" + CRLF + "Text: hi, how are you? "

Its a bit more readable, especially if you have more than 1 or 2 of them.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.