Table of Contents

Method OpenAsync

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

OpenAsync(IPersistenceSession, MailAccountId, OutgoingEmailRequester, IReadOnlyList<OutgoingRecipient>, long, DateTimeOffset, CancellationToken)

Writes down a new draft, at the revision its first stored message is.

Task<MailDraftRecord> OpenAsync(IPersistenceSession session, MailAccountId accountId, OutgoingEmailRequester author, IReadOnlyList<OutgoingRecipient> recipients, long mimeByteLength, DateTimeOffset composedAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins, which is the one the message is stored in.

accountId MailAccountId

The account the draft belongs to.

author OutgoingEmailRequester

The authored act that wrote it.

recipients IReadOnlyList<OutgoingRecipient>

The people it is addressed to, which may be nobody.

mimeByteLength long

How many bytes the stored message is.

composedAt DateTimeOffset

When it was written down.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<MailDraftRecord>

The draft as the write left it, at Composed.

Exceptions

ArgumentNullException

Thrown when session, author, or recipients is null.