Method DiscardAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Drafts
- Assembly
- MailFathom.Application.dll
DiscardAsync(MailDraftId, CancellationToken)
Gives up one of this user's drafts, and takes the copies of it back out of their folder.
public Task<MailDraftFilingResult> DiscardAsync(MailDraftId draftId, CancellationToken cancellationToken)
Parameters
draftIdMailDraftIdThe draft to give up.
cancellationTokenCancellationTokenCancels the reads and the writes.
Returns
- Task<MailDraftFilingResult>
What became of the copies the mailbox held.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold MailDraftsWrite, or is acting for no user.
- MailDraftRefusedException
Thrown when this user holds no draft under that identifier, or the draft has already been promoted to a send.