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.3.0 build 647 for .NET 4.5
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.

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.
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.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml;
msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink;
See Also