Click or drag to resize

SmtpSendCommandAsync(String, Boolean, CancellationToken) Method

Sends command to the SMTP server (e.g. "EHLO").

Namespace: Limilabs.Client.SMTP
Assembly: Mail (in Mail.dll) Version: 3.0.26106.1555
Syntax
public Task<SmtpResponse> SendCommandAsync(
	string command,
	bool throwException,
	CancellationToken cancel = default
)

Parameters

command  String
Command to be send e.g. "EHLO".
throwException  Boolean
If true throws SmtpResponseException on error response.
cancel  CancellationToken  (Optional)
A cancellation token that can be used to signal the asynchronous operation should be canceled.

Return Value

TaskSmtpResponse
Server's response.
Remarks
Most commands have their own specialized methods in this class, you should probably use them instead.
See Also