Table of Contents

Method CancelAsync

Namespace
MailFathom.Application.Mail.Delivery.Operations
Assembly
MailFathom.Application.dll

CancelAsync(OutgoingEmailId, CancellationToken)

Withdraws one send that has not begun transmitting.

public Task<OutboxDecisionOutcome> CancelAsync(OutgoingEmailId outgoingEmailId, CancellationToken cancellationToken)

Parameters

outgoingEmailId OutgoingEmailId

The send to cancel.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<OutboxDecisionOutcome>

What became of the send, including that it was not one this deployment holds or had already moved on.

Remarks

It is the only point at which sending is reversible at all, which is exactly why it refuses everything past that point rather than trying to catch up with it.

Exceptions

PrincipalNotAuthorizedException

Thrown when the use case was reached by anything but a caller granted AdminOperate.

OperationCanceledException

Thrown when the caller cancels.