Click or drag to resize
MimeKit

MailServiceDisconnectAsync Method

Asynchronously disconnect the service.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax
C#
public abstract Task DisconnectAsync(
	bool quit,
	CancellationToken cancellationToken = default
)

Parameters

quit  Boolean
If set to true, a logout/quit command will be issued in order to disconnect cleanly.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Implements

IMailServiceDisconnectAsync(Boolean, CancellationToken)
Exceptions
ExceptionCondition
ObjectDisposedException The MailService has been disposed.
Remarks
If quit is true, a logout/quit command will be issued in order to disconnect cleanly.
See Also