Class SmtpException
The base exception type for all SMTP errors. Carries the server reply (if any) that triggered the error.
Inheritance
Inherited Members
Namespace: DRIT.Mail.Rfc.Smtp
Assembly: DRIT.Mail.dll
Syntax
public class SmtpException : Exception, ISerializable, _Exception
Constructors
View SourceSmtpException(string)
Initializes a new instance of the SmtpException class.
Declaration
public SmtpException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to process. |
SmtpException(string, SmtpResponse?)
Initializes a new instance of the SmtpException class with the server reply that triggered the error.
Declaration
public SmtpException(string message, SmtpResponse? response)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to process. |
| SmtpResponse | response | Specifies the response value. |
SmtpException(string, SmtpResponse?, Exception)
Initializes a new instance of the SmtpException class with the server reply that triggered the error and an inner exception.
Declaration
public SmtpException(string message, SmtpResponse? response, Exception inner)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to process. |
| SmtpResponse | response | Specifies the response value. |
| Exception | inner | Specifies the inner value. |
SmtpException(string, Exception)
Initializes a new instance of the SmtpException class.
Declaration
public SmtpException(string message, Exception inner)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to process. |
| Exception | inner | Specifies the inner value. |
Properties
View SourceResponse
Gets the server reply that triggered the error, or null if the error was not caused by a server reply (e.g. a network failure).
Declaration
public SmtpResponse? Response { get; }
Property Value
| Type | Description |
|---|---|
| SmtpResponse |