Table of Contents

Method OpenArchiveAsync

Namespace
MailFathom.Application.Mail.Export
Assembly
MailFathom.Application.dll

OpenArchiveAsync(MailAccountId, MailboxExportId, CancellationToken)

Opens a finished export's archive, so the transport can copy it to the caller.

public Task<MailboxExportArchive> OpenArchiveAsync(MailAccountId account, MailboxExportId export, CancellationToken cancellationToken)

Parameters

account MailAccountId

The account the export belongs to.

export MailboxExportId

The export's identity.

cancellationToken CancellationToken

Cancels opening the archive.

Returns

Task<MailboxExportArchive>

The archive, which the caller disposes.

Remarks

A download already begun is not cut off by the retention period ending, because the stream is the store's own and the expiry deletes an object rather than a reader's connection.

Exceptions

PrincipalNotAuthorizedException

Thrown when the caller does not hold the export permission.

MailboxExportRefusedException

Thrown when the account holds no such export, or its archive is no longer there to serve.