Method ListEmailsAsync
- Namespace
- MailFathom.Application.Emails.ListEmails
- Assembly
- MailFathom.Application.dll
ListEmailsAsync(ListEmailsRequest, CancellationToken)
Lists one page of emails.
public Task<ListEmailsResult> ListEmailsAsync(ListEmailsRequest request, CancellationToken cancellationToken)
Parameters
requestListEmailsRequestWhat the caller asked for.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<ListEmailsResult>
The page, the cursor that continues the walk when one exists, and the scope's synchronization freshness.
Remarks
Nothing here writes, and the operation is therefore safe to repeat. It also never sets the remote \Seen
flag or any other remote state, because it speaks to no mail server at all.
Exceptions
- ArgumentNullException
Thrown when
requestis null.- MailboxQueryFilterInvalidException
Thrown when a filter carries a value, a count, or a length the query does not accept.
- MailAccountNotAccessibleException
Thrown when the request names an account this deployment does not serve.
- MailboxQueryPageSizeOutOfRangeException
Thrown when the request names a page size outside the accepted range.
- MailboxQueryCursorMalformedException
Thrown when the request carries a cursor this system did not issue.
- MailboxQueryCursorFilterMismatchException
Thrown when the cursor was issued for different filters than the request carries.