IAsyncEwsClient.ListMessagesAsync

ListMessagesAsync(string, string, int, MailQuery, bool, IEnumerable<PropertyDescriptor>, CancellationToken)

List the messages in the specified folder.

public Task<ExchangeMessageInfoCollection> ListMessagesAsync(string folder, string mailbox = null, 
    int maxNumberOfMessages = 0, MailQuery query = null, bool recursive = false, 
    IEnumerable<PropertyDescriptor> extendedProperties = null, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
folderStringA folder to search messages in.
mailboxStringThe mailbox that is used to initialize the folder id class.
maxNumberOfMessagesInt32Maximum number of messages.
queryMailQueryMailQuery that represents message search criteria.
recursiveBooleanIndicates whether recursive listing or not.
extendedPropertiesIEnumerable`1Extended properties of retrieved messages
cancellationTokenCancellationTokenThe cancellation token.

Return Value

ExchangeMessageInfoCollection that contains messages from the specified folder.

See Also


ListMessagesAsync(IEnumerable<string>, CancellationToken)

List the messages in the specified folder.

public Task<ExchangeMessageInfoCollection> ListMessagesAsync(IEnumerable<string> ids, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
idsIEnumerable`1Enumeration of message ids
cancellationTokenCancellationTokenThe cancellation token.

Return Value

ExchangeMessageInfoCollection that contains messages with.

See Also