• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class SmtpServerCapabilities

Extensions advertised by the server in its EHLO response. Immutable. Populated by Parse(SmtpResponse) from the EHLO reply.

Inheritance
object
SmtpServerCapabilities
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.Smtp
Assembly: DRIT.Mail.dll
Syntax
public sealed class SmtpServerCapabilities

Constructors

View Source

SmtpServerCapabilities(bool, bool, bool, bool, bool, long?, IReadOnlyCollection<string>, string)

Initializes a new instance of the SmtpServerCapabilities class.

Declaration
public SmtpServerCapabilities(bool supportsPipelining, bool supportsStartTls, bool supportsEightBitMime, bool supportsSmtpUtf8, bool supportsEnhancedStatusCodes, long? maxMessageSize, IReadOnlyCollection<string> authMechanisms, string serverName)
Parameters
Type Name Description
bool supportsPipelining
bool supportsStartTls
bool supportsEightBitMime
bool supportsSmtpUtf8
bool supportsEnhancedStatusCodes
long? maxMessageSize
IReadOnlyCollection<string> authMechanisms
string serverName

Properties

View Source

AuthMechanisms

Gets the SASL authentication mechanisms advertised by the server (AUTH extension, RFC 4954), upper-cased. Empty if the server does not advertise AUTH.

Declaration
public IReadOnlyCollection<string> AuthMechanisms { get; }
Property Value
Type Description
IReadOnlyCollection<string>
View Source

Empty

Gets an empty capabilities instance, used before the EHLO response has been received or when the server falls back to HELO.

Declaration
public static SmtpServerCapabilities Empty { get; }
Property Value
Type Description
SmtpServerCapabilities
View Source

MaxMessageSize

Gets the maximum message size in bytes advertised by the server (SIZE extension, RFC 1870), or null if the server did not advertise a limit.

Declaration
public long? MaxMessageSize { get; }
Property Value
Type Description
long?
View Source

ServerName

Gets the server name extracted from the first line of the EHLO response (typically the server's hostname).

Declaration
public string ServerName { get; }
Property Value
Type Description
string
View Source

SupportsEightBitMime

Gets a value indicating whether the server supports the 8BITMIME extension (RFC 1652).

Declaration
public bool SupportsEightBitMime { get; }
Property Value
Type Description
bool
View Source

SupportsEnhancedStatusCodes

Gets a value indicating whether the server supports the ENHANCEDSTATUSCODES extension (RFC 3463).

Declaration
public bool SupportsEnhancedStatusCodes { get; }
Property Value
Type Description
bool
View Source

SupportsPipelining

Gets a value indicating whether the server supports the PIPELINING extension (RFC 2920).

Declaration
public bool SupportsPipelining { get; }
Property Value
Type Description
bool
View Source

SupportsSmtpUtf8

Gets a value indicating whether the server supports the SMTPUTF8 extension (RFC 6531).

Declaration
public bool SupportsSmtpUtf8 { get; }
Property Value
Type Description
bool
View Source

SupportsStartTls

Gets a value indicating whether the server supports the STARTTLS extension (RFC 3207).

Declaration
public bool SupportsStartTls { get; }
Property Value
Type Description
bool

Methods

View Source

Parse(SmtpResponse)

Parses an EHLO response into an SmtpServerCapabilities instance.

Declaration
public static SmtpServerCapabilities Parse(SmtpResponse ehloResponse)
Parameters
Type Name Description
SmtpResponse ehloResponse

The positive EHLO reply.

Returns
Type Description
SmtpServerCapabilities

The parsed capabilities.

Exceptions
Type Condition
ArgumentNullException

Thrown if ehloResponse is null.

  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX