MessageParserConfigPlainToHtmlMode Property
Gets or sets if the plain-text body of the message should be automatically converted into HTML.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public PlainToHtmlAutoConvert PlainToHtmlMode { get; set; }

Property Value

Type: PlainToHtmlAutoConvert
The mode specifying the condition which triggers automatic conversion the plain-text body of the message into HTML. The default value is Never.
Remarks

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 Note
MessageParserConfig object cannot be used on its own. To access its members, the developer should use MailMessage.Parser property.
Examples
This sample loads the message from .EML file, converts its plain-text body into HTML if the HTML body is not available in the message, and displays the HTML body.
// 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);
See Also