Table of Contents

Method ReadWordsAsync

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

ReadWordsAsync(ReadOnlyMemory<byte>, CancellationToken)

Reads the subject and the body representations out of one composed message.

Task<OutgoingMailText> ReadWordsAsync(ReadOnlyMemory<byte> rawMime, CancellationToken cancellationToken)

Parameters

rawMime ReadOnlyMemory<byte>

The RFC 822 bytes that will be stored and transmitted.

cancellationToken CancellationToken

Cancels the parse.

Returns

Task<OutgoingMailText>

What the message says in words, with no attachment read and no refusal.

Remarks

This is the cheap read and the one to reach for by default. It opens no attachment, so it reaches no document parser and costs the parse of the message's own structure — which is what a caller wanting to show an author their own draft back needs, and all it needs.

Exceptions

ArgumentException

Thrown when rawMime is empty.

OperationCanceledException

Thrown when cancellationToken is cancelled.