Table of Contents

Method SaveRecurringSendDraftAsync

Namespace
MailFathom.Application.EmailContent.Storage
Assembly
MailFathom.Application.dll

SaveRecurringSendDraftAsync(IPersistenceSession, RecurringSendId, ReadOnlyMemory<byte>, CancellationToken)

Saves the draft every occurrence of one recurring send is composed from, once and only once.

Task SaveRecurringSendDraftAsync(IPersistenceSession session, RecurringSendId recurringSendId, ReadOnlyMemory<byte> draftMime, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The explicit persistence session this content write participates in.

recurringSendId RecurringSendId

The declaration the draft belongs to.

draftMime ReadOnlyMemory<byte>

The composed RFC 822 bytes the occurrences are made from.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task

A task that completes after durable storage.

Remarks

A draft is RFC 822 and therefore lives here rather than in a table of its own, which is what keeps every piece of mail content this system holds behind one port with one set of retention, erasure, and export obligations. It is not a message: nothing transmits it, and what each occasion transmits is composed from it with an identity and a date of that occasion's own.

Exceptions

ArgumentNullException

Thrown when session is null.

ArgumentException

Thrown when draftMime is empty.

InvalidOperationException

Thrown when no declaration carries recurringSendId.