Table of Contents

Method CancelAsync

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

CancelAsync(OutgoingEmailId, CancellationToken)

Withdraws one of this user's sends, where nothing has begun transmitting it.

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

Parameters

outgoingEmailId OutgoingEmailId

The record to withdraw.

cancellationToken CancellationToken

Cancels the read and the write.

Returns

Task<OutboxDecisionOutcome>

What became of the send, which is RecordUnknown for one this user does not hold.

Remarks

The scoping runs before the withdrawal rather than beside it, so a record this user may not be told about is never named to a store that acts on whatever identifier it is handed. What decides whether the send could still be withdrawn is the store's own conditional statement, which is what keeps a delivery pass from having a message cancelled out from under it mid-envelope.

Exceptions

PrincipalNotAuthorizedException

Thrown when the caller does not hold MailSend, or is acting for no user.