Class ImapServerCapabilities
Extensions advertised by the IMAP server in its CAPABILITY response (RFC 9051 §6.1.1). Immutable.
Inherited Members
Namespace: DRIT.Mail.Rfc.Imap
Assembly: DRIT.Mail.dll
Syntax
public sealed class ImapServerCapabilities
Constructors
View SourceImapServerCapabilities(bool, bool, bool, bool, bool, bool, bool, bool, IReadOnlyCollection<string>, IReadOnlyCollection<string>)
Initializes a new instance of the ImapServerCapabilities class.
Declaration
public ImapServerCapabilities(bool supportsImap4Rev2, bool supportsImap4Rev1, bool supportsStartTls, bool supportsIdle, bool supportsMove, bool supportsChildren, bool supportsNamespace, bool supportsUidPlus, IReadOnlyCollection<string> saslMechanisms, IReadOnlyCollection<string> all)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | supportsImap4Rev2 | |
| bool | supportsImap4Rev1 | |
| bool | supportsStartTls | |
| bool | supportsIdle | |
| bool | supportsMove | |
| bool | supportsChildren | |
| bool | supportsNamespace | |
| bool | supportsUidPlus | |
| IReadOnlyCollection<string> | saslMechanisms | |
| IReadOnlyCollection<string> | all |
Properties
View SourceAll
Gets all raw capability tokens advertised by the server.
Declaration
public IReadOnlyCollection<string> All { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCollection<string> |
Empty
Gets an empty capabilities instance, used before the CAPABILITY response has been received.
Declaration
public static ImapServerCapabilities Empty { get; }
Property Value
| Type | Description |
|---|---|
| ImapServerCapabilities |
SaslMechanisms
Gets the SASL authentication mechanisms advertised by the server
(AUTH= capability tokens), upper-cased.
Declaration
public IReadOnlyCollection<string> SaslMechanisms { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCollection<string> |
SupportsChildren
Gets a value indicating whether the server supports the CHILDREN extension (RFC 3348).
Declaration
public bool SupportsChildren { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsIdle
Gets a value indicating whether the server supports the IDLE extension (RFC 2177).
Declaration
public bool SupportsIdle { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsImap4Rev1
Gets a value indicating whether the server supports IMAP4rev1 (RFC 3501).
Declaration
public bool SupportsImap4Rev1 { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsImap4Rev2
Gets a value indicating whether the server supports IMAP4rev2 (RFC 9051).
Declaration
public bool SupportsImap4Rev2 { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsMove
Gets a value indicating whether the server supports the MOVE extension (RFC 6851).
Declaration
public bool SupportsMove { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsNamespace
Gets a value indicating whether the server supports the NAMESPACE extension (RFC 2342).
Declaration
public bool SupportsNamespace { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsStartTls
Gets a value indicating whether the server supports the STARTTLS extension (RFC 9051 §6.2.1).
Declaration
public bool SupportsStartTls { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsUidPlus
Gets a value indicating whether the server supports the UIDPLUS extension (RFC 4315).
Declaration
public bool SupportsUidPlus { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceParse(string)
Parses a CAPABILITY untagged response line into an ImapServerCapabilities instance.
Declaration
public static ImapServerCapabilities Parse(string capabilityText)
Parameters
| Type | Name | Description |
|---|---|---|
| string | capabilityText | The text after |
Returns
| Type | Description |
|---|---|
| ImapServerCapabilities | The parsed capabilities. |