Table of Contents

Method RequeueAsync

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

RequeueAsync(OutgoingEmailId, bool, CancellationToken)

Puts one send back where the next delivery pass claims it, with its attempts given back.

Task<OutboxDecisionOutcome> RequeueAsync(OutgoingEmailId outgoingEmailId, bool refusalRestated, CancellationToken cancellationToken)

Parameters

outgoingEmailId OutgoingEmailId

The send to offer again.

refusalRestated bool

Whether the caller has restated a permanent refusal, which is what a refused send needs before it is offered again.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<OutboxDecisionOutcome>

What happened to the send.

Remarks

Three stages reach it and no others. A send at TransmissionBegun is the one this decision exists for — nobody can say what its recipients received, nothing claims it again, and the choice to risk a second copy is the operator's rather than the code's. A send at Recorded is one waiting out a backoff, and offering it again is asking for it now. A send at Refused is reached only when refusalRestated says so, because the refusal on the record is the reason nothing offers it.

Sent and Cancelled are refused outright. The first would transmit a message that was already delivered, and the second would undo a withdrawal somebody decided on.

The attempts are given back, because a send that has spent its allowance would otherwise be refused again on its first attempt and the decision would change nothing. The failure recorded against it is kept, so the record still says why it stopped until something newer replaces it, and the recipients keep the answers they already have: an address a server settled is never offered a second time, whoever asked for the send to run again.