TextBodyPartCharset Property |
Namespace: MailBee.Mime
When composing a message, you can use this property to set different charsets for different text parts of the message.
It has no effect on parsing messages. To set the encoding to be used during parsing messages, use EncodingDefault or EncodingOverride properties.
// To use the code below, import MailBee namespaces at the top of your code. using MailBee; using MailBee.Mime; // The actual code (put it into a method of your class). MailMessage msg = new MailMessage(); msg.BodyHtmlText = "<b>Hello</b>, <i>World</i>!"; msg.BodyParts.Html.Charset = "utf-8"; msg.BodyPlainText = "Hello, World!"; msg.BodyParts.Plain.Charset = "us-ascii"; msg.SaveMessage(@"C:\Docs\TestMail.eml");