Constructor AuthoredResponseDrafting
- Namespace
- MailFathom.Application.Mail.Delivery.Drafts
- Assembly
- MailFathom.Application.dll
AuthoredResponseDrafting(StoredEmailResponseAuthoring, IAuthoredEmailComposer, MailDraftBook, AccessAuthorization)
Takes an answer somebody wrote to a stored email and holds it as a draft.
public AuthoredResponseDrafting(StoredEmailResponseAuthoring authoring, IAuthoredEmailComposer composer, MailDraftBook drafts, AccessAuthorization authorization)
Parameters
authoringStoredEmailResponseAuthoringTurns the stored email and what somebody wrote into the message to compose.
composerIAuthoredEmailComposerBuilds the MIME, and decides every header this system owns rather than the author.
draftsMailDraftBookWrites the record and the message down together, and brings the drafts folder into step.
authorizationAccessAuthorizationAnswers whether the caller that reached this holds the grant that lets it draft.
Remarks
It is the counterpart of AuthoredMailDrafting for the two answers that begin from mail this deployment already holds, and it is a sibling of AuthoredResponseSubmission rather than a mode of it. The threading identifiers, the quoted original, the carried attachments, and the subject prefix are StoredEmailResponseAuthoring's, so what reaches the composition is an ordinary authored message, indistinguishable at that point from one that answers nothing.
A revision re-authors from the answered email rather than from what the previous revision produced. That is what keeps a draft of a reply a reply after it is edited: the identifiers a client threads by come out of the stored copy every time, so an edit can neither lose them nor invent them.
Two grants are asked for, in this order. Drafting is refused first, because a caller that may not draft 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. Neither of them is the sending grant: what this leaves is a message nobody has been offered.