Opens a connection and optionally logs in to to the IMAP server.
function Connect( const AAutoLogin: boolean = true ): Boolean; virtual; reintroduce;
Connect is an overridden procedure in TIdIMAP4 that opens the connection to the IMAP4 server.
Connect sets the value in the ConnectionState property to csNonAuthenticated on entry to the method. When AAndLogin contains True, the value may also be updated after successful completion of the Login method.
Connect calls the inherited Connect method when Connected indicates the IMAP4 session has not been previously established. If Connected returns True, the method is exited with no additional processing.
Connect will call the Login method when AAndLogin contains True. Additional lines of text returned by the IMAP server may be stored in the Capabilities property when SASL is used for authenticating the client connection in ancestor classes.
The Login method may be called manually when additional IMAP4 commands are required after connection but prior to logging in, such as when issuing the Capability command. This also allows switching users on the same server without having to disconnect from the server.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.