 | SmtpClientSendCommand Method |
Send a custom command to the SMTP server.
Namespace:
MailKit.Net.Smtp
Assembly:
MailKit (in MailKit.dll) Version: 3.0.0
Syntaxprotected SmtpResponse SendCommand(
string command,
CancellationToken cancellationToken = default
)
Parameters
- command
- Type: SystemString
The command. - cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
The cancellation token.
Return Value
Type:
SmtpResponseThe command response.
Exceptions
RemarksSends a custom command to the SMTP server.
Note |
---|
The command string should not include the terminating \r\n sequence. |
See Also