IAsyncImapClient.ListMessagesAsync

ListMessagesAsync(string, long, bool, IEnumerable<string>, IConnection, CancellationToken)

Gets the list of messages in the specified folder

public Task<ImapMessageInfoCollection> ListMessagesAsync(string folderName = null, 
    long modificationSequence = 0, bool retrieveRecursively = false, 
    IEnumerable<string> messageExtraFields = null, IConnection connection = null, 
    CancellationToken token = default)
ParameterTypeDescription
connectionStringConnection to a server
folderNameInt64Folder to retrieve messages.
modificationSequenceBooleanModification sequence
retrieveRecursivelyIEnumerable`1Indicates, if messages have to be retrieved recursively.
messageExtraFieldsIConnectionList of extra parameters for a message wich will be requested.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


ListMessagesAsync(MailQuery, string, int, IConnection, CancellationToken)

Gets the list of messages in the current folder.

public Task<ImapMessageInfoCollection> ListMessagesAsync(MailQuery query, string folderName = null, 
    int maxNumberOfMessages = 0, IConnection connection = null, CancellationToken token = default)
ParameterTypeDescription
connectionMailQueryConnection to a server
folderNameStringMessages location
queryInt32MailQuery that represents search query.
maxNumberOfMessagesIConnectionMaximum number of messages.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Collection of ImapMessageInfo objects.

See Also