Topic Path: Symbol Reference > Classes > TIdPOP3 Class > TIdPOP3 Methods > Login Method
ContentsIndexHome
PreviousUpNext
TIdPOP3.Login Method

Perform authentication for the POP3 account.

procedure Login; virtual;

Login is a procedure used to perform authentication for the POP3 account. 

When transport-level security is used for the connection, Login uses UseTLS to perform the POP3 STLS command for the negotiated transport-level security. 

Login uses the value in AuthType to determine the mechanism used in authenticating the POP3 client to the server identified in Host and Port

When AuthType is atAPOP, the POP3 APOP command is used for authentication. The value in GreetingBanner is used to construct the 128-bit MD5 hash value (in hexadecimal form) for the authentication request. An EIdDoesNotSupportAPOP exception is raised if the APOP authentication mechanism is not supported on the POP3 server. 

When AuthType is atUserPass, the POP3 USER and PASS commands are used with the Username and Password properties to perform authentication for the POP3 client connection. 

When AuthType is atSASL, the SASLMechanisms.LoginSASL method is used to perform authentication for the Capabilities supported on the connection to the server. An EIdSASLMechNeeded exception is raised is SASLMechanisms is unassigned or no longer contains a valid SASL authentication mechanism. 

If an exception occurs while performing the Login method, Disconnect is called and the exception is re-raised prior to exit. 

Login is called form the Connect method when the AutoLogin property contains True. This is the default behavior for the POP3 component. Set AutoLogin to False to perform Login sometime after establishing the POP3 client connection.

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