Table of Contents

Struct MailSynchronizationWindow

Namespace
MailFathom.Domain.Synchronization
Assembly
MailFathom.Domain.dll

States how far back into a folder's history synchronization may reach.

public readonly record struct MailSynchronizationWindow : IEquatable<MailSynchronizationWindow>
Implements
Inherited Members

Remarks

The bound compares against the date the mail server received an email, which IMAP keeps as its INTERNALDATE, and never against the Date header that MailFathom stores as the sent timestamp. The two disagree for imported and forwarded mail: an archive copied onto a new server carries the arrival date of the copy, and a message forwarded today carries the old header date of what it quotes. Arrival is what decides whether an email is part of the backlog this bound exists to keep out of a first run, it grows with the UID sequence a run walks, and every server keeps it for every email, while a Date header can be absent or unparseable.

The bound is a date and not an instant because IMAP compares dates alone, disregarding time and time zone. An email received at any time of the day named by EarliestEmailReceivedDate is inside the window.

Properties

EarliestEmailReceivedDate

Gets the earliest date a server may have received an email on for it to be synchronized, or null when the window is unbounded.

Unbounded

Gets the window that reaches every email a folder still holds.

Methods

EmailsReceivedSince(DateOnly)

Creates a window that reaches no further back than one date.