Table of Contents

Method WriteAsync

Namespace
MailFathom.Application.Emails.ReplyDrafts
Assembly
MailFathom.Application.dll

WriteAsync(ReplyDraftBrief, CancellationToken)

Writes one reply, or answers with nothing where none could be written.

Task<ReplyDraft> WriteAsync(ReplyDraftBrief brief, CancellationToken cancellationToken)

Parameters

brief ReplyDraftBrief

The correspondence, the people in it, the style, and what the person asked for.

cancellationToken CancellationToken

Cancels the drafting.

Returns

Task<ReplyDraft>

The draft, or Nothing where the provider failed or answered unreadably.

Remarks

A provider that failed is not published as a failure: what a person has for that case is the composer they were already looking at. A refusal travels only where this deployment's own spend ceiling declined the call, because falling back there would leave somebody pressing a button the operator has already paid the last of the allowance for.

Exceptions

MailAnsweringBudgetExhaustedException

Thrown when this deployment has spent what it allows a provider for the period, which is the one refusal a caller publishes rather than answering with nothing.

SensitiveContentScannerUnavailableException

Thrown when a switched-on scanner could not establish what the correspondence carries, which withholds the drafting rather than sending text nothing scanned.