Setting and getting the message body

Top  Previous  Next

To set or get the body of a MimeMessage invoke the SetBody and GetBody methods respectively. When setting the message body, 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.

 

Example

This example sets the message body to a multi-line text phrase then displays the message body.

 

[C#]

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

// displays message body

Console.WriteLine(message.GetBody());

 

[Visual Basic]

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

' displays message body

Console.WriteLine(message.GetBody())

 

 





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

© 2021 JSCAPE LLC