Table of Contents

Method OpenAsync

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

OpenAsync(IPersistenceSession, MailAccountId, UserId, OutgoingEmailRequester, IReadOnlyList<MailDraftRecipient>, string, long, DateTimeOffset, CancellationToken)

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

Task<MailDraftRecord> OpenAsync(IPersistenceSession session, MailAccountId account, UserId writtenBy, OutgoingEmailRequester author, IReadOnlyList<MailDraftRecipient> recipients, string subject, long mimeByteLength, DateTimeOffset composedAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

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

account MailAccountId

The account the draft belongs to, by its generated identifier.

writtenBy UserId

The user writing it, who is the one person among the account's assigned users who reads it.

author OutgoingEmailRequester

The authored act that wrote it.

recipients IReadOnlyList<MailDraftRecipient>

The people it is addressed to, which may be nobody, each with where its address came from.

subject string

The subject line the composed message carries.

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.