SmtpException Constructor
Namespace: Rebex.Net
Assembly: Rebex.Smtp.dll (version 7.0.9083)
SmtpException()
Initializes a new instance of the SmtpException class.
Declaration
public SmtpException()
Remarks
This constructor initializes the Message property of the new instance to a message that describes the general error.
SmtpException(String)
Initializes a new instance of the SmtpException class with the specified error message.
Declaration
public SmtpException(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message that describes the error. |
SmtpException(String, SmtpExceptionStatus)
Initializes a new instance of the SmtpException class with the specified error message and status.
Declaration
public SmtpException(string message, SmtpExceptionStatus status)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message that describes the error. |
SmtpExceptionStatus | status | One of the SmtpExceptionStatus values. |
Remarks
The status must not be ProtocolError. Use SmtpException (SmtpResponse response) constructor for creating protocol error exceptions.
SmtpException(String, SmtpExceptionStatus, SmtpRejectedRecipient[])
Initializes a new instance of the SmtpException class with the specified error message, status, and a list of rejected recipients.
Declaration
public SmtpException(string message, SmtpExceptionStatus status, SmtpRejectedRecipient[] rejected)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message that describes the error. |
SmtpExceptionStatus | status | One of the SmtpExceptionStatus values. |
SmtpRejectedRecipient[] | rejected | A list of rejected recipients. |
Remarks
The status must not be ProtocolError. Use SmtpException (SmtpResponse response) constructor for creating protocol error exceptions.
SmtpException(String, Exception)
Initializes a new instance of the SmtpException class with the specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public SmtpException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message that describes the error. |
Exception | innerException | The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. |
SmtpException(String, Exception, SmtpExceptionStatus)
Initializes a new instance of the SmtpException class with the specified error message, status, and a reference to the inner exception that is the cause of this exception.
Declaration
public SmtpException(string message, Exception innerException, SmtpExceptionStatus status)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message that describes the error. |
Exception | innerException | The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. |
SmtpExceptionStatus | status | One of the SmtpExceptionStatus values. |
Remarks
The status must not be ProtocolError. Use SmtpException (SmtpResponse response) constructor for creating protocol error exceptions.
SmtpException(SmtpResponse)
Initializes a new instance of the SmtpException class with the specified SmtpResponse.
Declaration
public SmtpException(SmtpResponse response)
Parameters
Type | Name | Description |
---|---|---|
SmtpResponse | response | The SmtpResponse. |