Smtp ClientNo Op Method
Ping the SMTP server to keep the connection alive.
Definition
Namespace: MailKit.Net.Smtp
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
IMailServiceNoOp(CancellationToken)
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public override void NoOp(
CancellationToken cancellationToken = default
)Parameters
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Implements
IMailServiceNoOp(CancellationToken)IMailServiceNoOp(CancellationToken)
Remarks
Mail servers, if left idle for too long, will automatically drop the connection.
Exceptions
| ObjectDisposedException | The SmtpClient has been disposed. |
| ServiceNotConnectedException | The SmtpClient is not connected. |
| OperationCanceledException | The operation was canceled. |
| IOException | An I/O error occurred. |
| SmtpCommandException | The SMTP command failed. |
| SmtpProtocolException | An SMTP protocol error occurred. |