Click or drag to resize

ImapClientListMessagesAsync Method (String, MailQuery, Int32, CancellationToken)

Gets the list of messages in the current folder.

Namespace:  Aspose.Email.Clients.Imap
Assembly:  Aspose.Email (in Aspose.Email.dll) Version: 22.4
Syntax
public Task<ImapMessageInfoCollection> ListMessagesAsync(
	string folderName,
	MailQuery query,
	int maxNumberOfMessages,
	CancellationToken token
)

Parameters

folderName
Type: SystemString
Messages location
query
Type: Aspose.Email.Tools.SearchMailQuery
MailQuery that represents search query.
maxNumberOfMessages
Type: SystemInt32
Maximum number of messages.
token
Type: System.ThreadingCancellationToken
Propagates notification that operations should be canceled.

Return Value

Type: TaskImapMessageInfoCollection
Collection of ImapMessageInfo objects.
See Also