TextBodyPartCollectionHtml Property |
Namespace: MailBee.Mime
If the message contains more than one HTML body, this property will return the first found. If the message does not contain HTML body, accessing this property will create new one.
If the above behaviour is not suitable for your case, you can always iterate through the collection and examine each text part as it appears in the message.
// 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.BodyParts.Html.Text = "<i>Hello</i>, <b>World</b>!"; msg.SaveMessage(@"C:\Docs\TestMail.eml");