Click or drag to resize
MimeKit

IMailServiceDisconnect Method

Disconnect the service.

Namespace:  MailKit
Assembly:  MailKit (in MailKit.dll) Version: 2.3.0
Syntax
C#
void Disconnect(
	bool quit,
	CancellationToken cancellationToken = null
)

Parameters

quit
Type: SystemBoolean
If set to true, a "QUIT" command will be issued in order to disconnect cleanly.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.
Exceptions
ExceptionCondition
ObjectDisposedException The IMailService has been disposed.
ServiceNotConnectedException The IMailService is not connected.
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

Disconnects from the service.

If quit is true, a "QUIT" command will be issued in order to disconnect cleanly.

See Also