Method DraftAsync
- Namespace
- MailFathom.Application.Emails.ReplyDrafts
- Assembly
- MailFathom.Application.dll
DraftAsync(ReplyDraftRequest, CancellationToken)
Drafts a reply to one of the acting user's messages.
public Task<ReplyDraft?> DraftAsync(ReplyDraftRequest request, CancellationToken cancellationToken)
Parameters
requestReplyDraftRequestWhich message is being answered, if any, and what its author asked the reply to say.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<ReplyDraft>
The draft, Nothing where none could be written, or null where the request named a message this user does not hold.
Exceptions
- ArgumentNullException
Thrown when
requestis null.- MailAnsweringBudgetExhaustedException
Thrown when this deployment has spent what it allows a provider for the period.
- SensitiveContentScannerUnavailableException
Thrown when a switched-on scanner could not establish what the draft carries, which withholds it rather than publishing it unscanned.
- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted both AssistantUse and MailRead.