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
sessionIPersistenceSessionThe session the write joins, which is the one the message is stored in.
accountIdMailAccountIdThe account the draft belongs to.
authorOutgoingEmailRequesterThe authored act that wrote it.
recipientsIReadOnlyList<OutgoingRecipient>The people it is addressed to, which may be nobody.
mimeByteLengthlongHow many bytes the stored message is.
composedAtDateTimeOffsetWhen it was written down.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<MailDraftRecord>
The draft as the write left it, at Composed.
Exceptions
- ArgumentNullException
Thrown when
session,author, orrecipientsis null.