Method SendAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Drafts
- Assembly
- MailFathom.Application.dll
SendAsync(MailDraftId, CancellationToken)
Queues one of this user's drafts for delivery, which is the only act here that reaches anybody else.
public Task<OutgoingEmailRecord> SendAsync(MailDraftId draftId, CancellationToken cancellationToken)
Parameters
draftIdMailDraftIdThe draft to send.
cancellationTokenCancellationTokenCancels the reads and the write.
Returns
- Task<OutgoingEmailRecord>
The durable record the message was written down as.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold MailSend, or is acting for no user.
- MailDraftRefusedException
Thrown when this user holds no draft under that identifier, when the draft names nobody to send it to, or when the stored message exceeds what this deployment sends.
- OutgoingMailRefusedException
Thrown when a recipient, a ceiling, or the account's own posture refuses the send.