Click or drag to resize
MimeKit

IMailServiceIsConnected Property

Get whether or not the service is currently connected.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.3.0
Syntax
C#
bool IsConnected { get; }

Property Value

Boolean
true if the service connected; otherwise, false.
Remarks

The IsConnected state is set to true immediately after one of the Connect methods succeeds and is not set back to false until either the client is disconnected via Disconnect(Boolean, CancellationToken) or until a ProtocolException is thrown while attempting to read or write to the underlying network socket.

When an ProtocolException is caught, the connection state of the IMailService should be checked before continuing.

See Also