SmtpException.SmtpException

SmtpException(SmtpStatusCode)

Initializes a new instance of the SmtpException class with the status code returned by the server.

public SmtpException(SmtpStatusCode statusCode)
ParameterTypeDescription
statusCodeSmtpStatusCodeThe SMTP status code.

See Also


SmtpException(SmtpStatusCode, string)

Initializes a new instance of the SmtpException class with the status code returned by the server and an error message.

public SmtpException(SmtpStatusCode statusCode, string message)
ParameterTypeDescription
statusCodeSmtpStatusCodeThe SMTP status code.
messageStringThe message that describes the error.

See Also


SmtpException()

Initializes a new instance of the SmtpException class.

public SmtpException()

See Also


SmtpException(string)

Initializes a new instance of the SmtpException class with the specified error message.

public SmtpException(string message)
ParameterTypeDescription
messageStringThe message that describes the error.

See Also


SmtpException(string, SendMessagesResult)

Initializes a new instance of the SmtpException class with an error message and the result of sending several messages.

public SmtpException(string message, SendMessagesResult result)
ParameterTypeDescription
messageStringThe message that describes the error.
resultSendMessagesResultThe sent and failed messages.

See Also


SmtpException(string, Exception)

Initializes a new instance of the SmtpException class with the specified error message and a reference to the exception that caused it.

public SmtpException(string message, Exception innerException)
ParameterTypeDescription
messageStringThe message that describes the error.
innerExceptionExceptionThe exception that caused this exception, or null.

See Also


SmtpException(string, Exception, MailMessage)

Initializes a new instance of the SmtpException class for a message that could not be sent.

public SmtpException(string message, Exception innerException, MailMessage mailMessage)
ParameterTypeDescription
messageStringThe message that describes the error.
innerExceptionExceptionThe exception that caused this exception, or null.
mailMessageMailMessageThe message that could not be sent.

See Also


SmtpException(string, MailMessage)

Initializes a new instance of the SmtpException class for a message that could not be sent.

public SmtpException(string message, MailMessage mailMessage)
ParameterTypeDescription
messageStringThe message that describes the error.
mailMessageMailMessageThe message that could not be sent.

See Also