Table of Contents

Interface IMailboxNotificationSession

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

Waits on a long-lived session for the mail server to report that one folder changed.

public interface IMailboxNotificationSession : IAsyncDisposable
Inherited Members

Remarks

This session reads nothing. It reports that a folder changed and never what changed, so the synchronization pass a notification starts is the ordinary one — the same code path polling runs, over its own read-only session, with the same bounds and the same \Seen guarantee. Nothing here may fetch an envelope, a body, or a flag: a second retrieval path is exactly what would let the read-only invariant hold in one place and lapse in the other.

The session is long-lived by nature, which is what makes it the one place a rotated credential could otherwise stay in use. Its owner recycles it when the settings it was opened under are superseded, so the connection is the operation boundary here that a per-run connect is everywhere else.

One session is used by one waiter at a time, and nothing here is safe for concurrent use.

Methods

WaitForFolderChangeAsync(TimeSpan, CancellationToken)

Waits until the folder changes or until the supplied wait elapses, whichever comes first.