This project is read-only.

Working with messages

Starting from version 2.0.0.10, ImapX allows you to choose the way how messages are being requested. You can set the download mode globally or individually for a search or a single message.

Setting the global message download mode.

By default, the global download mode is set to Basic. This requests flags, headers, body structure, size, internal date and the message body (excluding embedded images and attachments).

/* .. Init client, authenticate .. */          
client.Behavior.MessageFetchMode = MessageFetchMode.Basic

Out of the box there are four predefined download modes:

// Request flags, headers and the body structure
MessageFetchMode.Tiny

// Request flags, headers, body structure, size and internal date
MessageFetchMode.Minimal

// Request flags, headers, body structure and body, size and internal date
MessageFetchMode.Basic

// Request flags, headers, body and attachments, size and internal date
MessageFetchMode.Full

If you want to make it more individual, you can build your own bit mask:

// Request basic information and GMail mesage id, labels and thread id
client.Behavior.MessageFetchMode = MessageFetchMode.Basic |  MessageFetchMode.GMailExtendedData

Next

Last edited May 1, 2014 at 2:38 PM by pavel_azanov, version 2