| SmtpClientSendCommandAsync Method |
Asynchronously send a custom command to the SMTP server.
Namespace: MailKit.Net.SmtpAssembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax protected Task<SmtpResponse> SendCommandAsync(
string command,
CancellationToken cancellationToken = default
)
Parameters
- command String
- The command.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskSmtpResponseThe command response.
Exceptions Remarks Asynchronously sends a custom command to the SMTP server.
Note |
---|
The command string should not include the terminating \r\n sequence. |
See Also