Setting the message body

Top  Previous  Next

To set the body of an email message invoke the SetBody method on the EmailMessage instance. Paragraph breaks in the message body are represented by a carriage return line feed (CRLF) using the escape characters \r\n. Optionally you can set the body of the message from the contents of a file. If the body of the message contains non US-ASCII character data then see Sending an Email message for languages other than English.

 

Note

 

Due to the way that the message body is copied when adding attachments it is important that attachments be added only after the body of the message has been defined. Changing the body, Content-Type, or Content-Transfer-Encoding of the message after attachments have been added may result in undesired effects.

 

 

Example

 

[C#]

message.SetBody("Go over status of project.\r\nThanks\r\nBob");

 

[Visual Basic]

message.SetBody("Go over status of project.\r\nThanks\r\nBob")

 

 

See also

 

Sending an Email message for languages other than English





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC