Table of Contents

Constructor DescribedMailFolder

Namespace
MailFathom.Application.Folders
Assembly
MailFathom.Application.dll

DescribedMailFolder(MailFolderFreshness, MailFolderSpecialUse?, IReadOnlyList<string>, int, int)

Describes one folder as a screen drawing a mailbox tree reads it.

public DescribedMailFolder(MailFolderFreshness Freshness, MailFolderSpecialUse? Role, IReadOnlyList<string> HierarchyLevels, int StoredEmailCount, int UnreadEmailCount)

Parameters

Freshness MailFolderFreshness

How current the local copy of the folder is, which is also what names the folder.

Role MailFolderSpecialUse?

The role the folder plays for its account, or null when configuration labels it with none.

HierarchyLevels IReadOnlyList<string>

The folder's place on its mail server, outermost level first, and empty when nothing has bound the alias to a remote folder yet.

StoredEmailCount int

How many of the folder's emails this deployment holds.

UnreadEmailCount int

How many of those the mail server last reported without \Seen.

Remarks

The role is the answer a screen cannot work out for itself. Special-use folders are identified by server attributes rather than by their names, which differ per provider and per language, so a client that guessed which folder is the sent one from its name would guess wrong on somebody's Polish provider. It is MailFolderMapping's label — what an operator wrote, or what discovery matched — and never a name this reduced from.

The levels are the server's own hierarchy rather than the alias, because an alias is one configured word — upper cased, unique within its account, and flat by construction — and a mailbox tree is not drawn from those. They are split here rather than published as a path and a delimiter, so no reader has to know that a delimiter exists.

The counts are of the local copy. A folder still being backfilled holds fewer than the mail server does, which is why the freshness travels in the same value rather than being available separately: a count without it is a figure a reader would take for the mailbox's own.