Table of Contents

Method RecordFilingFailureAsync

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

RecordFilingFailureAsync(OutgoingEmailId, MailFathomErrorCode, CancellationToken)

Records why the last filing attempt for one send did not put a copy anywhere.

Task RecordFilingFailureAsync(OutgoingEmailId outgoingEmailId, MailFathomErrorCode failure, CancellationToken cancellationToken)

Parameters

outgoingEmailId OutgoingEmailId

The record whose copy could not be filed.

failure MailFathomErrorCode

The code identifying what ended the attempt.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the code is on the record.

Remarks

It takes no session and moves no stage, deliberately. A send whose copy could not be filed is a send that happened, so the delivery stage stands exactly where the submission left it and this is written beside it.

Writing outside the caller's transaction is what keeps that true when the caller has none: filing runs after a delivery has been committed, and a failure to file must not be able to roll a delivery back.