MessageParserConfigHtmlToSimpleHtmlMode Property
Gets or sets the mode which specifies when the HTML part of the message should be converted into simple HTML (plain text converted into HTML).

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public HtmlToSimpleHtmlAutoConvert HtmlToSimpleHtmlMode { get; set; }

Property Value

Type: HtmlToSimpleHtmlAutoConvert
The mode specifying the condition which triggers automatic conversion of the HTML part of the message into simple HTML during parsing the message. The default value is Never.
Remarks
Simple HTML represenation can be useful if it's required to get plain-text version of HTML body but display this plain text in HTML container (such as browser). See HtmlToSimpleHtmlAutoConvert topic for details.
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 HTML body into simple HTML format, and displays it.
// 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.HtmlToSimpleHtmlMode = HtmlToSimpleHtmlAutoConvert.IfHtml;
msg.Parser.HtmlToSimpleHtmlOptions = HtmlToSimpleHtmlConvertOptions.AddImgAltText;
Console.WriteLine(msg.BodyHtmlText);
See Also