TextBodyPartCollectionPlain Property
Gets a reference to the plain-text part of the message.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public TextBodyPart Plain { get; }

Property Value

Type: TextBodyPart
A reference to TextBodyPart object representing the plain-text body and its headers.
Remarks

If the message contains more than one plain-text body, this property will return the first found. If the message does not contain plain-text body, accessing this property will create new one.

If the above behaviour is not suitable for your case, you can always iterate through the collection and examine each text part as it appears in the message.

Examples
This sample creates a new message with the plain-text body and saves it to disk. In real-world apps, however, it would be easier to set plain-text body contents using BodyPlainText property.
// 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.BodyParts.Plain.Text = "Hello, World!";
msg.SaveMessage(@"C:\Docs\TestMail.eml");
See Also