MailBee.NET Objects 4.0

ImapBodyStructure Class

Represents a structure of a MIME part of a mail message.

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

System.Object
   MailBee.ImapMail.ImapBodyStructure

public class ImapBodyStructure

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

The IMAP4 protocol allows the client to query information about all MIME parts of a mail message without downloading the entire message. The server returns this information as a tree of body structures, where each body structure describes the corresponding MIME part and contains a list of nested body structures if the corresponding MIME part is multipart.

The common use of body structures is to list attachments of a mail message (see the sample code in Envelope topic). Another case is processing envelopes of international messages, because body structures contain charset settings of mail messages. When a body structure of a certain message is available, MailBee is able to decode the message envelope fields containing international characters more correctly.

When an entire message is downloaded, there is no need to download its body structure since all the required information is already available in the message data.

To access body structure information, the developer should request receiving body structures from the server when calling DownloadEnvelopes method by setting BodyStructure flag in parts parameter value. A reference to the ImapBodyStructure object representing the root MIME part of the mail message can then be obtained via BodyStructure property value.

By default, MailBee represents the body structure tree as a branching linked list. This reflects nested nature of MIME parts. However, it's often more convenient to get this tree as a simple collection. MailBee provides GetAllParts method for this.

Requirements

Namespace: MailBee.ImapMail

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

See Also

ImapBodyStructure Members | MailBee.ImapMail Namespace