Method DeclareAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Scheduling
- Assembly
- MailFathom.Application.dll
DeclareAsync(RecurringMailSubmissionRequest, CancellationToken)
Declares one message to be sent again on every occasion a schedule names, or refuses it.
public Task<RecurringSend> DeclareAsync(RecurringMailSubmissionRequest request, CancellationToken cancellationToken)
Parameters
requestRecurringMailSubmissionRequestThe repetition that was asked for.
cancellationTokenCancellationTokenCancels the reads and the write.
Returns
- Task<RecurringSend>
The declaration, whether this call created it or an identical earlier one did.
Exceptions
- ArgumentNullException
Thrown when
requestis null.- PrincipalNotAuthorizedException
Thrown when the caller does not hold MailSend.
- MailAccountNotAccessibleException
Thrown when the request names an account this deployment does not serve.
- MailSubmissionRefusedException
Thrown when the repetition is unreadable, a recipient names nobody, a field cannot be composed, a bound is exceeded, or the account configures no address to send from.
- PersistenceConcurrencyConflictException
Thrown when the write lost its race for the same identity on every allowed attempt.