Class AuthoredResponseSubmission
- Namespace
- MailFathom.Application.Mail.Delivery.Submission
- Assembly
- MailFathom.Application.dll
Takes an answer somebody wrote to a stored email and queues it, which is the whole of what asking to reply or forward does.
public sealed class AuthoredResponseSubmission
- Inheritance
-
AuthoredResponseSubmission
- Inherited Members
Remarks
It is the counterpart of AuthoredMailSubmission for the two sends that begin from mail this deployment already holds, and it composes the same three steps in the same order: the answer is authored from the stored copy, the authored message becomes MIME, and the MIME and the request become a durable record. What replaces the resolution of an account and a recipient list is the authoring itself, because a reply is addressed by the message it answers rather than by whoever asked for it.
Nothing here transmits, and nothing here composes. The threading identifiers, the quoted original, the carried attachments, and the subject prefix are StoredEmailResponseAuthoring's, and this use case neither reads them nor could: what it receives back is an ordinary authored message, indistinguishable at this point from one that answers nothing. That is what keeps a reply and a forward bounded by the same numbers and composed by the same code as every other send.
Two grants are asked for, and they are asked for in this order. Sending is refused first, because a caller that may not send has no business reaching a use case that reads the mail it would have quoted; reading is refused by the authoring beneath, because an answer quotes the message it answers and a forward carries that message's files, so anything that reached here without it would read mail by asking to reply to it.
The message is composed against BeforeAnyServerHasSpoken for the reason a new message is: the server that will carry it is not being talked to and must not be, and what that server does decide is asked again by the delivery pass against the length that was stored.
Constructors
- AuthoredResponseSubmission(StoredEmailResponseAuthoring, IAuthoredEmailComposer, MailOutbox, AuthoredSendGovernor, AccessAuthorization)
Takes an answer somebody wrote to a stored email and queues it, which is the whole of what asking to reply or forward does.
Methods
- SubmitAsync(MailResponseSubmissionRequest, CancellationToken)
Queues one answer to a stored email, or refuses it naming what the caller has to change.