EnvelopeParts Enumeration

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
[FlagsAttribute]
public enum EnvelopeParts
Members
  Member nameValueDescription
Uid0 Request UID of the message. Since this value is 0, the UID is always requested. Also, the server always returns the ordinal number of the message in the folder (MessageNumber).
Flags1 Request the message flags.
InternalDate2 Request the datetime value assigned by the server to message (usually, it's the date when the message was received by the server).
Rfc822Size4 Request the length of the entire message in bytes.
Envelope8 Request the ENVELOPE information of the message.
BodyStructure16 Request the body structure of the message.
MessagePreview32 Request the message header or the entire message. This item can be used in conjunction with bodyPreviewSize parameter of DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method.
MailBeeEnvelope15 The combination of Flags, InternalDate, Rfc822Size, and Envelope.
All63 The combination of MailBeeEnvelope, BodyStructure, and MessagePreview. Note that Gmail-specific fields are not included.
GmailMessageID64 Request the Gmail-specific message-id (with it, unique message may be identified across multiple folders). This message-id is a string containing 64-bit positive number.
GmailThreadID128 Request the Gmail-specific thread-id (with it, you can group multiple messages in conversations). This thread-id is a string containing 64-bit positive number.
GmailLabels256 Request the Gmail-specific list of labels associated with the message.
Remarks

In the IMAP4 protocol, all message related information is downloaded using FETCH command. DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method issues FETCH command, processes its responses, and represents it to the application as the EnvelopeCollection of Envelope objects where each object represents a single FETCH response (one response corresponds to a single message).

With FETCH commands, it's possible to download any parts or attributes of mail messages. The most common attribute is ENVELOPE (that's why MailBee's object which encapsulates FETCH response is called Envelope). However, with FETCH response, it's also possible to download any other elements of mail messages (and it's even not necessary to download ENVELOPE element itself).

Depending on which elements of FETCH response were requested during DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method call, certain properties of the Envelope objects within the returned collection may contain empty values or useful information. For instance, if only Uid was requested, the only property values which will be set in the Envelope object are Uid and MessageNumber.

Uid and MessageNumber property values are always available. To obtain other message-related information, the developer should request the corresponding items from the server when calling DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method. The items to be downloaded need to be specified in parts parameter of DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method.

The following list shows relationships beetween EnvelopeParts elements and Envelope object properties which are set when the corresponding elements have been requested during DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method call:

EnvelopeParts elementEnvelope property
FlagsFlags
InternalDateDateReceived
Rfc822SizeSize
EnvelopeBcc, Cc, Date, From, InReplyTo, MessageID, ReplyTo, Sender, Subject, To
BodyStructureBodyStructure
MessagePreviewMessagePreview
MailBeeEnvelopeCombination of effects of Flags, InternalDate, Rfc822Size, and Envelope
AllCombination of effects of MailBeeEnvelope, BodyStructure, and MessagePreview
Gmail specific message-id, thread-id, label listCan be used only with Gmail-compatible server (The mail server must support Gmail search syntax ("x-gm-ext-1" capability must be listed in GetExtensions results).

Note Note
DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method also allows the application to download FETCH items by their names. The developer can use this to download the specific MIME parts of the message, the specific headers, or if the particular server supports non-standard FETCH elements the developer interested in.
See Also