EnvelopeParts Enumeration |
Namespace: MailBee.ImapMail
Member name | Value | Description | |
---|---|---|---|
Uid | 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). | |
Flags | 1 | Request the message flags. | |
InternalDate | 2 | Request the datetime value assigned by the server to message (usually, it's the date when the message was received by the server). | |
Rfc822Size | 4 | Request the length of the entire message in bytes. | |
Envelope | 8 | Request the ENVELOPE information of the message. | |
BodyStructure | 16 | Request the body structure of the message. | |
MessagePreview | 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. | |
MailBeeEnvelope | 15 | The combination of Flags, InternalDate, Rfc822Size, and Envelope. | |
All | 63 | The combination of MailBeeEnvelope, BodyStructure, and MessagePreview. Note that Gmail-specific fields are not included. | |
GmailMessageID | 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. | |
GmailThreadID | 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. | |
GmailLabels | 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 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 element | Envelope property |
---|---|
Flags | Flags |
InternalDate | DateReceived |
Rfc822Size | Size |
Envelope | Bcc, Cc, Date, From, InReplyTo, MessageID, ReplyTo, Sender, Subject, To |
BodyStructure | BodyStructure |
MessagePreview | MessagePreview |
MailBeeEnvelope | Combination of effects of Flags, InternalDate, Rfc822Size, and Envelope |
All | Combination of effects of MailBeeEnvelope, BodyStructure, and MessagePreview |
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). |
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. |