Table of Contents

Method SettlePromotedAsync

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

SettlePromotedAsync(OutgoingEmailId, CancellationToken)

Gives up the draft one delivered send was promoted from, and takes its copy out of the folder.

public Task<IReadOnlyList<MailDraftFilingResult>> SettlePromotedAsync(OutgoingEmailId outgoingEmailId, CancellationToken cancellationToken)

Parameters

outgoingEmailId OutgoingEmailId

The send whose attempt has just ended.

cancellationToken CancellationToken

Cancels the reads and the commands.

Returns

Task<IReadOnlyList<MailDraftFilingResult>>

What the attempt did, which is empty for a send that came from no draft or has not been delivered.

Remarks

It is keyed on the send having actually been delivered rather than on it having been promoted, which is the whole of what makes a promotion safe to ask for. A message that is refused, deferred, or left with an unknown outcome leaves the draft exactly as it was, so an owner whose send failed still has the message they wrote.

The draft is given up rather than deleted outright, so the removal of its copy follows the same recorded sequence every other removal does and a process that dies mid-way is resumed by the pass above.