MessageParserConfigPlainToHtmlQuotationTag Property |
Gets or sets the string containing the tag to be used for highlighting quotations in the message.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string PlainToHtmlQuotationTag { get; set; }
Public Property PlainToHtmlQuotationTag As String
Get
Set
Property Value
Type:
String
A string containing the quoting tag (like
<...>). The default value is an empty string.
Remarks
Usually this property is used in plain-text reply messages. If it's set to non-empty string,
then the following activities are also performed during converting plain-text into HTML:
- To determine the quotation sign, the alphanumeric string (without spaces) ending with ">" will be
searched on every line of the plain-text body
- Then the entire quotation will be highlighted in the finished HTML text
Closing tags are generated automatically. For instance, if
PlainToHtmlQuotationTag is
<font color=red>,
MailBee will automatically finish every quoted line with
</font>.
Examples This sample loads the message from .EML file, sets the quoting tag and tells MailBee to generate HTML version of the plain-text
body even if the HTML body is available (this is required since we're not interested in HTML body in this sample), and displays the
generated HTML body with quotations high-lighted.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfPlain;
msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink;
msg.Parser.PlainToHtmlQuotationTag = "<font color=red>";
Console.WriteLine(msg.BodyHtmlText);
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfPlain
msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink
msg.Parser.PlainToHtmlQuotationTag = "<font color=red>"
Console.WriteLine(msg.BodyHtmlText)
See Also