SmtpCommandException(SmtpErrorCode, SmtpCommand, SmtpResponse, MailboxAddress) 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,
	MailboxAddress mailbox
)

Parameters

code  SmtpErrorCode
The error code.
command  SmtpCommand
The command that the server responded to.
response  SmtpResponse
The server's response.
mailbox  MailboxAddress
The rejected mailbox.

Remarks

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

Exceptions

ArgumentNullException

response is .

-or-

mailbox is .

See Also