Table of Contents

Constructor UserMailDrafts

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

UserMailDrafts(ICallerMailAccountCatalog, MailDraftBook, MailDraftPromotion, AccessAuthorization)

Performs the acts a user takes on one of their own drafts: keeping it, giving it up, and sending it.

public UserMailDrafts(ICallerMailAccountCatalog accountCatalog, MailDraftBook book, MailDraftPromotion promotion, AccessAuthorization authorization)

Parameters

accountCatalog ICallerMailAccountCatalog

Says which user the caller is acting for, which is what a draft is scoped against.

book MailDraftBook

Performs the two acts on the draft itself, in the one place each is decided.

promotion MailDraftPromotion

Turns a draft into an ordinary send, in the one place that is decided.

authorization AccessAuthorization

Answers whether the caller that reached this holds the grant the act it asked for needs.

Remarks

It is the user's counterpart of MailDraftBook and MailDraftPromotion, exactly as UserOutbox is the user's counterpart of the administrative outbox, and it differs from them in one thing: it says who the caller is acting for. Each act those two perform asks the author for itself, so a caller wired straight to one of them cannot reach a draft it did not write; this is where the user the caller is acting for is resolved once and handed to whichever of them the act belongs to.

A draft another user holds answers exactly as one nobody holds. There is no refusal that separates the two cases and no timing that does either, which is the rule every act on a draft follows, here and in the two types below. The comparison is against the draft's own recorded author rather than against the accounts listing, so an account unassigned since the draft was written still resolves to the person who wrote it.

Each act asks for its own grant rather than for one grant covering all three. Giving a draft up is writing it, keeping one in the user's folder reaches their mail server, and sending one puts a message in somebody else's mailbox — three different powers, and a credential holding one of them has not been granted the others.