Table of Contents

Method FindStoredContentAsync

Namespace
MailFathom.Application.EmailContent.Storage
Assembly
MailFathom.Application.dll

FindStoredContentAsync(StoredEmailId, CancellationToken)

Reads back the raw MIME stored for one locally stored email, with what was recorded about it.

Task<StoredEmailContent?> FindStoredContentAsync(StoredEmailId storedEmailId, CancellationToken cancellationToken)

Parameters

storedEmailId StoredEmailId

The stable local identifier of the metadata row.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<StoredEmailContent>

The stored content, or null when no content is stored for that email.

Remarks

The read joins no session, because it participates in no write and a transaction held open across it would only widen a lock around a large payload. Absent content is an ordinary answer rather than a failure: an occurrence whose message exceeded the size limit is recorded with its metadata and no content at all.

The recorded length and digest come back with the payload rather than being verified here, so a caller that serves mail to a reader can tell a damaged local copy apart from an absent one and act on the difference.