Adding HTML content

Top  Previous  Next

If your message body contains HTML content then you must change the content-type of the EmailMessage instance. Otherwise your HTML message may be represented as plain-text by some email client applications. This can be done by invoking the SetContentType method.

 

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.SetContentType("text/html");

 

[Visual Basic]

message.SetContentType("text/html")

 

 

 





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

© 2021 JSCAPE LLC