Indy 9 | Content | Index | Reference

TUserHandler
Unit: IdSMTPServer
Event type signalled to perform account authentication.

    TUserHandler = procedure (ASender: TIdCommand; var Accept: Boolean; Username, Password: string) of object;

Unit
IdSMTPServer
Parameters
Accept
Indicates if the authentication is successful.
ASender
Command generating the event notification.
Password
Client credentials used for authorization.
Username
Client identity used for authorization.
Description
TUserHandler is an event type signalled when a threaded client is authenticated during connection. TUserHandler is the event type generated for the TIdSMTPServer.CheckUser event handler, and allows the SMTP server to perform validation of Username and Password values read from the client connection.

An event handler for the TUserHandler event type can be used to access the data store for account identities and credentials to perform authentication for the values in Username and Password. The event handler may also set the value in Accepted to True, to indicate that authentication is successful, or False to indicate that authentication has failed.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.