Class RemoteEmailFlagSnapshot
- Namespace
- MailFathom.Domain.Emails
- Assembly
- MailFathom.Domain.dll
Reports the IMAP flags a mail server last showed for one email, and when they were read.
public sealed record RemoteEmailFlagSnapshot : IEquatable<RemoteEmailFlagSnapshot>
- Inheritance
-
RemoteEmailFlagSnapshot
- Implements
- Inherited Members
Remarks
The snapshot is an observation of server state and travels in one direction only: MailFathom reads mail read-only, so
no application path turns any of these into an IMAP STORE. Above all, reading an email through MailFathom never
sets \Seen remotely, and this type reports what the server said rather than what a local reader did.
ObservedAt is what separates "the server reported none of these flags" from "nobody has looked
yet", which no combination of the booleans can express on its own. A caller that filters or displays a flag reads it
together with the timestamp, because NeverObserved carries every flag as false and
no keyword at all without having asked any server.
The five booleans and the keywords are one observation rather than two, because one FLAGS response carries
both and the timestamp answers for all of them. What separates them is only that the five have meanings the protocol
fixes, while a keyword means whatever the client that set it meant.
Constructors
- RemoteEmailFlagSnapshot(DateTimeOffset?, bool, bool, bool, bool, bool, RemoteEmailKeywords)
Reports the IMAP flags a mail server last showed for one email, and when they were read.
Properties
- IsAnswered
Whether the server reported the
\Answeredflag.
- IsDeleted
Whether the server reported the
\Deletedflag.
- IsDraft
Whether the server reported the
\Draftflag.
- IsFlagged
Whether the server reported the
\Flaggedflag.
- IsSeen
Whether the server reported the
\Seenflag.
- Keywords
The keywords the server reported beside those five, which are flags nobody standardized.
- NeverObserved
Gets the snapshot of an email whose remote flags no run has read yet.
- ObservedAt
When the flags below were last read from the server, or null while they have never been read.
- WasObserved
Gets whether these flags were read from a server rather than never observed.