Table of Contents

Interface IOutgoingMailFilingStore

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

Keeps the durable account of every copy of an outgoing message MailFathom has put into a folder.

public interface IOutgoingMailFilingStore

Remarks

The rows hang off the outgoing record and are read back with it, so a caller asking what became of a send learns where its copies are from the same read. What this port adds is the two things that read is the wrong shape for: the writes one append makes as it happens, and the query a synchronization run issues about a folder rather than about a record.

The identity of a filing is the outgoing record and the place together, which is what makes the first write of an append idempotent: asking to file the same message into the same place twice reaches one row, and a second copy in somebody's folder is exactly what that prevents.

Nothing here returns anything derived from a message. A folder, an alias, a UID, and an identity MailFathom minted itself are what a row holds, which is what lets provenance be established without reading mail.

Methods

ReadFilingsAtAsync(MailAccountId, RemoteFolderPath, ImapUidValidity, IReadOnlyCollection<ImapUid>, IReadOnlyCollection<string>, CancellationToken)

Reads the filings that put a copy into one folder at one of the occurrences a batch discovered.

RecordAppendConfirmedAsync(IPersistenceSession, OutgoingEmailId, OutgoingMailFiling, AppendedMailCopy, CancellationToken)

Writes down what the server said about the copy it accepted.

RecordAppendIssuedAsync(IPersistenceSession, OutgoingEmailId, OutgoingMailFiling, MailFolderResolution, DateTimeOffset, CancellationToken)

Writes down that an append is about to be issued, before the command goes out.

RecordFilingFailureAsync(OutgoingEmailId, MailFathomErrorCode, CancellationToken)

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

RecordFilingObservedAsync(IPersistenceSession, OutgoingEmailId, OutgoingMailFiling, DateTimeOffset, CancellationToken)

Writes down that synchronization has met the copy one filing put in a folder.

RecordWithdrawnAsync(IPersistenceSession, OutgoingEmailId, OutgoingMailFiling, DateTimeOffset, CancellationToken)

Writes down that the copy has been taken back out of its folder.