Table of Contents

Class ContactCorrespondenceReader

Namespace
MailFathom.Application.Contacts.Correspondence
Assembly
MailFathom.Application.dll

Correlates one contact with the mail the caller may already read about them.

public sealed class ContactCorrespondenceReader
Inheritance
ContactCorrespondenceReader
Inherited Members

Remarks

It stores nothing and derives nothing durable. A contact is a name and a set of addresses; what an opened contact shows beside it — the exchanges those addresses appear in and the documents they sent — is a question the mail index can already answer, so it is answered on the read instead of being copied onto the contact and kept in step with a mailbox afterwards.

It answers through the visibility the caller already has. The scope is ReadableScopeAsync(IReadOnlyList<MailAccountSelector>, IReadOnlyList<MailFolderReference>, JunkMailInclusion, CancellationToken)'s, unchanged — the accounts the signed-in user is assigned, the folders a mapping admits, no junk — so a message this caller may not see is outside the query rather than filtered out of its result, and no list here carries a withheld entry for somebody to notice. Junk is left out by the same default every listing takes: what an opened contact answers is what this person and the reader have been doing, and a message an account's own junk folder holds is not that.

It reaches no mail server. Both lists answer from what synchronization has already stored and what derivation has already indexed, so no request from a browser can wait on IMAP and none can set the remote \Seen flag.

It is one of the points mail content leaves this deployment, so where a sensitive-content scanner is switched on the subjects and the file names are scanned before the answer is returned; a scanner that cannot answer refuses the answer rather than serving it unscanned.

Constructors

ContactCorrespondenceReader(IContactCorrespondenceIndex, MailboxScopeResolver, SensitiveContentEgressGuard, IMailboxReadTelemetry, AccessAuthorization, TimeProvider)

Initializes the use case.

Methods

ReadAsync(Contact, CancellationToken)

Reads what the caller's own mail holds about one contact.