SmtpCommandException(SmtpErrorCode, SmtpCommand, SmtpResponse, Exception) Constructor

Initializes a new instance of the SmtpCommandException class.

Definition

Namespace: MailKit.Net.Smtp
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public SmtpCommandException(
	SmtpErrorCode code,
	SmtpCommand command,
	SmtpResponse response,
	Exception innerException
)

Parameters

code  SmtpErrorCode
The error code.
command  SmtpCommand
The command that the server responded to.
response  SmtpResponse
The server's response.
innerException  Exception
The inner exception.

Remarks

Creates a new SmtpCommandException using the response text as the error message.

Exceptions

ArgumentNullException response is .

See Also