Table of Contents

Constructor MailDraftDirectory

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

MailDraftDirectory(ICallerMailAccountCatalog, IMailDraftStore, IEmailContentStore, IOutgoingMailTextReader, AccessAuthorization)

Answers which drafts the user in hand is writing, and resolves one of them by identity.

public MailDraftDirectory(ICallerMailAccountCatalog accountCatalog, IMailDraftStore drafts, IEmailContentStore contentStore, IOutgoingMailTextReader text, AccessAuthorization authorization)

Parameters

accountCatalog ICallerMailAccountCatalog

Says which accounts the caller's user is assigned, and therefore which one a caller may name.

drafts IMailDraftStore

Holds the durable account of every draft.

contentStore IEmailContentStore

Holds the composed MIME each revision is.

text IOutgoingMailTextReader

Reads back what a composed message says, so an author gets their own words to go on editing.

authorization AccessAuthorization

Answers whether the caller that reached this holds the grant that lets it draft.

Remarks

It exists because a person composing mail needs their drafts back after closing the window, and because the acts beneath it — revising a draft, giving one up, keeping one on the server, attaching a file to one — name a draft by an identifier that says nothing about whose it is. MailDraftBook admits those acts on the grant alone, which is what a deployment holding one user needs and not what a user-facing surface may rely on, so this is where an identifier becomes a draft the caller's own user holds.

A draft another user holds answers exactly as one nobody holds. There is no listing that crosses users, no refusal that separates the two cases, and no timing that does either, which is the same rule every user-facing read here follows.

It is published under MailDraftsWrite rather than under MailRead, which is the same choice the outgoing reader makes: what a draft says is what this caller was allowed to compose, and a credential granted to read a mailbox has not been granted to read the outgoing correspondence being prepared in it.

The answer is bounded and carries no cursor. Drafts are what one person has open at a time rather than a corpus, so a bound a screen cannot exhaust is the whole of what a listing needs — and a cursor into somebody's composition would be a walk over their unsent mail rather than a page of it.