Internet Direct (Indy) Version 9.0.2 Beta
TIdIMAP4.Disconnect
Closes an IMAP4 session and connection.

procedure Disconnect; override;
Description
Disconnect is an overriden procedure in TIdIMAP4 that closes an IMAP4 session and connection. If Connected is False, an EIdNotConnected exception will be raised.

Disconnect calls the SendCmd method using the IMAP LOGOUT command prior to calling the inherited Disconnect method and setting ConnectionState to the value csNonAuthenticated.