Topic Path: Symbol Reference > Classes > TIdSMTP Class > TIdSMTP Methods > Disconnect Method
TIdSMTP.Disconnect Method

Closes the SMTP session.

procedure Disconnect(
    AImmediate: Boolean
); override;
Indicates that the remote server is immediately notified of the closed session. 

Disconnect is an overridden method used to close the SMTP session. When Connected is True, the Disconnect method can be used to issue the SMTP QUIT command that inform the remote server that the session will be ended. 

Disconnect calls the inherited Disconnect method using AImmediate as an argument. Disconnect resets an internal flag that indicates the session has been authenticated. 

Use Connect to open an SMTP session using the Host and Port defined for the client.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.