Class ImapMailbox
The result of a SELECT or EXAMINE command (RFC 9051 §6.3.1). Immutable. Contains the mailbox metadata from untagged responses.
Inherited Members
Namespace: DRIT.Mail.Rfc.Imap
Assembly: DRIT.Mail.dll
Syntax
public sealed class ImapMailbox
Constructors
View SourceImapMailbox(string, bool, int, int, long, long, ImapMessageFlags, int)
Initializes a new instance of the ImapMailbox class.
Declaration
public ImapMailbox(string name, bool isReadOnly, int exists, int recent, long uidValidity, long uidNext, ImapMessageFlags permanentFlags, int firstUnseen)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| bool | isReadOnly | |
| int | exists | |
| int | recent | |
| long | uidValidity | |
| long | uidNext | |
| ImapMessageFlags | permanentFlags | |
| int | firstUnseen |
Properties
View SourceExists
Gets the number of messages in the mailbox (EXISTS).
Declaration
public int Exists { get; }
Property Value
| Type | Description |
|---|---|
| int |
FirstUnseen
Gets the sequence number of the first message that does not have
\Seen set (UNSEEN), or 0 if not reported.
Declaration
public int FirstUnseen { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsReadOnly
Gets a value indicating whether the mailbox was opened in
read-only mode (EXAMINE or [READ-ONLY] response code).
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Gets the mailbox name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
PermanentFlags
Gets the permanent flags that the server will persist across
sessions. If * is included, user-defined keywords are
allowed.
Declaration
public ImapMessageFlags PermanentFlags { get; }
Property Value
| Type | Description |
|---|---|
| ImapMessageFlags |
Recent
Gets the number of recent messages (RECENT).
Declaration
public int Recent { get; }
Property Value
| Type | Description |
|---|---|
| int |
UidNext
Gets the UIDNEXT value — the next UID that will be
assigned to a new message.
Declaration
public long UidNext { get; }
Property Value
| Type | Description |
|---|---|
| long |
UidValidity
Gets the UIDVALIDITY value. UIDs are valid across sessions
only if this value does not change.
Declaration
public long UidValidity { get; }
Property Value
| Type | Description |
|---|---|
| long |