Table of Contents

Method RecomposeAsOccurrence

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

RecomposeAsOccurrence(MailAccountId, OutgoingEmailRequester, IReadOnlyList<OutgoingRecipient>, ReadOnlyMemory<byte>, MailDeliveryCapabilities)

Composes one occasion's message from the draft a recurring send was declared with, or refuses it.

AuthoredEmailComposition RecomposeAsOccurrence(MailAccountId accountId, OutgoingEmailRequester requester, IReadOnlyList<OutgoingRecipient> recipients, ReadOnlyMemory<byte> draftMime, MailDeliveryCapabilities capabilities)

Parameters

accountId MailAccountId

The account the message is sent as, which decides the From address again.

requester OutgoingEmailRequester

The occasion asking, which is what makes one occasion's message one delivery.

recipients IReadOnlyList<OutgoingRecipient>

The people this occasion is offered to, as the declaration recorded them.

draftMime ReadOnlyMemory<byte>

The stored draft, exactly as the declaration was made with.

capabilities MailDeliveryCapabilities

What the submission server said it will accept, or what holds before one has spoken.

Returns

AuthoredEmailComposition

The composed message, or the refusal that stopped it.

Remarks

Every occasion is a message of its own, and this is where that becomes true rather than aspirational: the draft is stamped with an identity and a date of this occasion's, so a year of Mondays is a year of messages instead of one message a client threads over itself and a server may refuse as a duplicate.

What the draft says the message is from is replaced rather than kept, because a message is sent as the account that sends it and an operator may have changed what that account writes as since the declaration was made. The rest of the draft is transmitted as it stands, hidden recipients included: the addresses this occasion is offered to come from the declaration beside it, because a blind recipient is by construction not in the bytes.

The bounds are applied again here, against the message this occasion actually became. A deployment that has since tightened what it will send refuses the occasion rather than transmitting under the bound that was in force when somebody wrote the draft.

Exceptions

ArgumentNullException

Thrown when requester, recipients, or capabilities is null.

ArgumentException

Thrown when draftMime is empty.