Table of Contents

Interface IEmailAttachmentContentReader

Namespace
MailFathom.Application.EmailContent.Attachments
Assembly
MailFathom.Application.dll

Opens one attachment of a stored message, by the position the message's walk gave it.

public interface IEmailAttachmentContentReader

Remarks

A separate port from IEmailContentRenderer because it answers a different question about the same bytes: the renderer produces everything a reader is shown and holds nothing open afterwards, while this holds one part open so its octets can be streamed out. Sharing one contract would make every read of a body carry the lifetime of a file nobody asked for.

An implementation classifies the message exactly as the renderer does, so the position a link names is the position the read that issued the link published. It reaches no mail server and no network: it is handed bytes that were already stored.

Methods

OpenAsync(StoredEmailContent, int, CancellationToken)

Opens the attachment at one position of a stored message.