Constructor UserOutbox
- Namespace
- MailFathom.Application.Mail.Delivery.Tracking
- Assembly
- MailFathom.Application.dll
UserOutbox(ICallerMailAccountCatalog, IOutgoingEmailStore, IOutboxOperationStore, AccessAuthorization)
Serves one user their own outbox: what is queued, what became of one send, and the two decisions about it.
public UserOutbox(ICallerMailAccountCatalog accountCatalog, IOutgoingEmailStore outgoingEmails, IOutboxOperationStore outbox, AccessAuthorization authorization)
Parameters
accountCatalogICallerMailAccountCatalogSays which accounts the caller's user is assigned, and therefore which one a listing may name.
outgoingEmailsIOutgoingEmailStoreHolds the durable record of every send.
outboxIOutboxOperationStorePerforms the two conditional decisions, in the one place each is decided.
authorizationAccessAuthorizationAnswers whether the caller that reached this holds the grant that lets it send.
Remarks
It is the user's counterpart of the administrative OutboxOperations and of the per-caller OutgoingMailReader, and the three differ in exactly one thing: whose sends they reach. An operator reaches every send this deployment holds, a tool caller reaches the sends that caller itself queued, and a person reaches the sends their own mailboxes are sending — which is what a mail client shows, and what makes a send queued from one head answerable from another.
A listing names an account and never the deployment. The narrowing is resolved against the accounts the caller's user is assigned, so there is no unnarrowed reading here at all: one that fell back to every account would page through every user's outgoing mail, which is the deployment-wide catalog a user-facing surface must never compose. An account another user is assigned is refused exactly as one nobody configured.
What the answers may carry is what the administrative reading already settled and for the same reasons. A page names no recipient and no subject, because a page of an outbox would otherwise be an export of who this user writes to; one send read by identity names its recipients and what each was told, because that is the question it was asked. Neither reads the message.
Every act here is MailSend, including the readings. What an outbox says is what this user is sending, so a credential granted to read a mailbox learns nothing here — and withdrawing a send is part of sending rather than a power beside it, which is the same reading the per-caller cancellation takes.