Table of Contents

Method CancelAsync

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

CancelAsync(OutgoingEmailId, CancellationToken)

Withdraws the send one identifier names, where nothing has begun transmitting it.

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

Parameters

outgoingEmailId OutgoingEmailId

The record to withdraw.

cancellationToken CancellationToken

Cancels the read and the write.

Returns

Task<OutgoingEmailRecord>

The record as it stands after the call, which for a withdrawal is at Cancelled.

Remarks

The grant is the sending one, because withdrawing a send is part of sending rather than a separate power: what a caller may stop is exactly what it was allowed to start, and nothing here reaches a message it did not queue. The scoping runs before the withdrawal rather than beside it, so a record this caller may not be told about is never named to a store that acts on whatever identifier it is handed.

Exceptions

PrincipalNotAuthorizedException

Thrown when the work was not reached by a caller granted MailSend.

QueuedSendRefusedException

Thrown when no send this caller queued is held under that identifier, or when the send can no longer be withdrawn.