Table of Contents

Method RunAsync

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

RunAsync(MailAccountId, CancellationToken)

Claims one batch of the account's due sends and attempts each of them.

public Task<MailOutboxPassReport> RunAsync(MailAccountId accountId, CancellationToken stoppingToken)

Parameters

accountId MailAccountId

The account whose outbox is drained.

stoppingToken CancellationToken

Stops each attempt when the host is shutting down.

Returns

Task<MailOutboxPassReport>

What each claimed send ended in, and whether there is more waiting behind the batch.

Remarks

Cancellation does not end the pass early. Every claimed send is still reached, because reaching it is what gives its lease back — a pass abandoned mid-batch would leave the sends behind the one that was running held until their leases expired.