MailBee.NET Objects 3.1

MimePart Class

Represents a MIME part of the message.

For a list of all members of this type, see MimePart Members.

System.Object
   MailBee.Mime.MimePart

public class MimePart

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Each e-mail message consists of one or more MIME parts. Each MIME part consists of a header section and (optionally) a body section. The body section may contain the actual content (text, binary data, etc) or other MIME parts nested into this part. Attachments, text body parts and the message itself are examples of MIME parts.

During parsing the message, MailBee creates a tree of linked MimePart and MimePartCollection objects.

To access the MIME part which corresponds to the message itself (the root part), use MimePartTree property. To access the MIME part which corresponds to a certain attachment, use AsMimePart property of that Attachment object. To access the MIME part which corresponds to a certain text body part, use AsMimePart property of that TextBodyPart object.

Because most properties of MimePart and Attachment object have the same meaning (and every attachment is internally a MIME part - you can get it with Attachment.AsMimePart property), the documentation on these properties usually refers to their versions in Attachment class. Some MimePart properties, however, not applicable or important for Attachment object and thus can only be found in MimePart class.

It's usually not need to create MimePart objects manually. To compose a message consisting of multiple parts, add attachments or text body parts to it. MailBee will produce MIME parts for them during building the message.

However, it's possible to create an instance of MimePart class using Parse method.

Example

The example is available in Boundary topic.

Requirements

Namespace: MailBee.Mime

Assembly: MailBee.NET (in MailBee.NET.dll)

See Also

MimePart Members | MailBee.Mime Namespace | MailMessage | Attachment | TextBodyPart