Topic Path: Symbol Reference > Classes > TIdPOP3Server Class > TIdPOP3Server Events > OnAPOP Event
ContentsIndexHome
PreviousUpNext
TIdPOP3Server.OnAPOP Event

Implements alternative authentication for POP3 client connections.

property OnAPOP: TIdPOP3ServerAPOPCommandEvent;

OnAPOP is a TIdPOP3ServerAPOPCommandEvent property that represents the event handler signalled when a threaded client connection performs the POP3 APOP command verb. OnAPOP allows the server to implement an alternate method of authentication which does not involve sending a password as clear text over the network. 

OnAPOP is triggered by the command event handler that implements the SMTP APOP command using values read from the client context for the connection. 

AMailboxID is the POP3 account name (or mailbox) accessed by the client connection. 

ADigest is the 16-octet hexadecimal MD5 Message Digest calculated by applying the MD5 algorithm specified in RFC 1321 to a string consisting of the timestamp (including angle-brackets) followed by the shared APOP secret for the client connection. 

Assign a procedure to the event handler to allow responding to the event notification. If the mailbox identifier and message digest are correct, the event handler is responsible for write a positive POP3 response to the client connection, and setting the TIdPOP3ServerThread.State to the correct value. 

OnAPOP is not triggered when TIdPOP3ServerThread contains a value other than Auth in State for the client context. In addition, the event handler is also skipped when an invalid number of APOP arguments are available from the client connection. 

Negative POP3 responses are written by the command event handler that triggers OnAPOP when TIdPOP3ServerThread.State does not contain the value Auth on entry, and the value Trans on exit.

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