MessageParserConfigPlainToHtmlMode Property |
Namespace: MailBee.Mime
You may need to set this property in order to display plain-text message in an HTML container (such as browser).
To set additional options for coverting plain text into HTML, use HtmlToPlainOptions property.
Note |
---|
MessageParserConfig object cannot be used on its own. To access its members, the developer should use MailMessage.Parser property. |
// 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.LoadMessage(@"C:\Docs\TestMail.eml"); msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml; msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink; Console.WriteLine(msg.BodyHtmlText);