Internet Direct (Indy) Version 9.0.1 Beta
TIdIMAP4.ConnectionState
Indicates the IMAP4 connection state.

property ConnectionState: TIdIMAP4ConnectionState;
Description
ConnectionState is a read-only TIdIMAP4ConnectionState property that indicates the state of the IMAP4 connection. AN IMAP4 connection can exist in one of the following states: Non-Authenticated, Authenticated, Selected, and Logout. ConnectionState is used to determine which IMAP commands are valid for the indicated state.

ConnectionState can contain one the follwing TIdIMAP4ConnectionState values:

csAny permits the commands cmdCAPABILITY, cmdNOOP, and cmdLOGOUT.

csNonAuthenticated permits commands from the csAny connection state, as well as the commands cmdAUTHENTICATE and cmdLOGOUT.

csAuthenticated permits commands from the csNonAuthenticated connection state, as well as the commands cmdSELECT, cmdEXAMINE, cmdCREATE, cmdDELETE, cmdRENAME, cmdSUBSCRIBE, cmdUNSUBSCRIBE, cmdLIST, cmdLSUB, cmdSTATUS, and cmdAPPEND.

csSelected permits commands from the csAuthenticated connection state, as well as the commands cmdCHECK, cmdCLOSE, cmdEXPUNGE, cmdSEARCH, cmdFETCH, cmdSTORE, cmdCOPY, cmdUID, and the experimental/expansion commmands represented by cmdXCmd.