|0||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).|
|1||Request the message flags.|
|2||Request the datetime value assigned by the server to message (usually, it's the date when the message was received by the server).|
|4||Request the length of the entire message in bytes.|
|8||Request the ENVELOPE information of the message.|
|16||Request the body structure of the message.|
|32||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.|
|15||The combination of, , , and .|
|63||The combination of, , and . Note that Gmail-specific fields are not included.|
|64||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.|
|128||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.|
|256||Request the Gmail-specific list of labels associated with the message.|
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 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 Envelope object properties which are set when the corresponding elements have been requested during DownloadEnvelopes(String, Boolean, EnvelopeParts, Int32, String, String) method call:elements and
|Bcc, Cc, Date, From, InReplyTo, MessageID, ReplyTo, Sender, Subject, To|
|Combination of effects of, , , and|
|Combination of effects of, , and|
|Gmail specific message-id, thread-id, label list||Can 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).|
|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.|