Click or drag to resize

ImapSearchAsync Method (ICriterion)

Gets UIDS of all messages that match specified search criteria using server-side searching sorted from oldest to newest. Use And(ICriterion), Or(ICriterion, ICriterion) and other Expression methods to create a valid search query. You can also pass SimpleImapQuery to this method.

Namespace:  Limilabs.Client.IMAP
Assembly:  Mail (in Mail.dll) Version: 3.0.23341.1754
Syntax
public Task<List<long>> SearchAsync(
	ICriterion criterion
)

Parameters

criterion
Type: Limilabs.Client.IMAPICriterion
Search criteria. Use And(ICriterion) to join several criterions.

Return Value

Type: TaskListInt64
UID list sorted from oldest to newest.
Examples
List<long> uids = imap.Search(Expression.And(Expression.Subject("report"), Expression.HasFlag(Flag.Unseen)));
See Also