Table of Contents

Method OpenReadOnlyAsync

Namespace
MailFathom.Application.Synchronization.Sessions
Assembly
MailFathom.Application.dll

OpenReadOnlyAsync(MailAccountId, MailFolderResolution, MailTransportSecurityPolicy, CancellationToken)

Opens a folder read-only so synchronization cannot mutate remote mailbox state.

Task<IMailboxSession> OpenReadOnlyAsync(MailAccountId accountId, MailFolderResolution folder, MailTransportSecurityPolicy transportSecurityPolicy, CancellationToken cancellationToken)

Parameters

accountId MailAccountId

The local account identifier.

folder MailFolderResolution

The alias binding whose remote path is selected read-only.

transportSecurityPolicy MailTransportSecurityPolicy

The connection and authentication policy the implementation must obey.

cancellationToken CancellationToken

Cancels connecting, authenticating, and selecting the folder.

Returns

Task<IMailboxSession>

An open read-only mailbox session the caller owns and must dispose.

Remarks

The session receives the whole binding rather than a path, because every occurrence identity it produces is scoped by the generation the binding carries.

The policy is an input rather than something the implementation resolves, so an adapter cannot widen the permitted authentication mechanisms or downgrade the connection on its own.

Exceptions

MailboxUnavailableException

Thrown when the mail server did not accept the session within its configured resilience budget.