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
sessionIPersistenceSessionThe explicit persistence session this content write participates in.
recurringSendIdRecurringSendIdThe declaration the draft belongs to.
draftMimeReadOnlyMemory<byte>The composed RFC 822 bytes the occurrences are made from.
cancellationTokenCancellationTokenPropagates 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
sessionis null.- ArgumentException
Thrown when
draftMimeis empty.- InvalidOperationException
Thrown when no declaration carries
recurringSendId.