Method RequirePermittedAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Governance
- Assembly
- MailFathom.Application.dll
RequirePermittedAsync(IReadOnlyList<AuthoredEmailRecipient>, OutgoingEmailRequest, CancellationToken)
Requires that this caller may be talked into the message it composed.
public Task<AuthoredSendPermit> RequirePermittedAsync(IReadOnlyList<AuthoredEmailRecipient> authored, OutgoingEmailRequest request, CancellationToken cancellationToken)
Parameters
authoredIReadOnlyList<AuthoredEmailRecipient>The message as its author wrote it, which says where each address came from.
requestOutgoingEmailRequestThe send about to be written down, which carries the addresses as they parsed.
cancellationTokenCancellationTokenCancels the read of the contact book.
Returns
- Task<AuthoredSendPermit>
What the send was admitted as, which is what records it once it is durable.
Exceptions
- ArgumentNullException
Thrown when
authoredorrequestis null.- InvalidOperationException
Thrown when this was reached under no principal at all, which is a use case that governed a send before it established who asked.
- OutgoingMailRefusedException
Thrown when a recipient is refused by the policy, when this caller has reached a ceiling of its own, or when the posture refuses a recipient nothing here vouches for.