TextBodyPartIsOriginal Property
Indicates if the text part came with the message or it was added automatically during parsing the message.

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

Property Value

Type: Boolean
true if the text part is the original part of the message; otherwise, false.
Remarks

If the message does not have plain-text or HTML body, Parser object can be configured to tell MailBee to generate such a body (in fact, create the corresponding TextBodyPart) during parsing. MailBee will place automatically created parts of the message into BodyParts collection.

Also, the developer can manually add a text part into BodyParts collection using its methods.

The scenarios listed above will produce TextBodyPart objects having IsOriginal set to false.

Examples
This sample loads the message from .EML file, generates HTML body from the plain-text body, and reports whether HTML and plain-text parts are original.
// 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)

// Load plain-text message and make HTML body automatically.
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\PlainTextEmail.eml");
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfPlain;

// Report plain-text and HTML parts origin.
Console.WriteLine("Plain part IsOriginal = " + msg.BodyParts.Plain.IsOriginal.ToString());
Console.WriteLine("HTML part IsOriginal = " + msg.BodyParts.Html.IsOriginal.ToString());
See Also