Click or drag to resize
MimeKit

MailServiceNoOp Method

Ping the mail server to keep the connection alive.

Namespace:  MailKit
Assembly:  MailKit (in MailKit.dll) Version: 2.3.0
Syntax
C#
public abstract void NoOp(
	CancellationToken cancellationToken = null
)

Parameters

cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Implements

IMailServiceNoOp(CancellationToken)
Exceptions
ExceptionCondition
ObjectDisposedException The MailService has been disposed.
InvalidOperationException

The MailService is not connected.

-or-

The MailService is not authenticated.

OperationCanceledException The operation was canceled via the cancellation token.
IOException An I/O error occurred.
CommandException The command was rejected by the mail server.
ProtocolException The server responded with an unexpected token.
Remarks
Mail servers, if left idle for too long, will automatically drop the connection.
See Also