PopLogin
INT PopLogin(
HCLIENT hClient,  
UINT nAuthType,  
LPCTSTR lpszUserName,  
LPCTSTR lpszPassword  
);

The PopLogin function authenticates the specified user in on the remote server. This function must be called after the connection has been established, and before attempting to retrieve messages or perform any other function on the remote host.

Parameters

hClient
Handle to the client session.
nAuthType
Identifies the type of authentication that should be used when the client logs in to the mail server. The following authentication methods are supported:
Constant Description
POP_AUTH_DEFAULT The default authentication scheme which sends the username and password as cleartext to the server. This is the same as specifying POP_AUTH_PASS as the authentication type.
POP_AUTH_PASS Standard cleartext username and password is sent to the server. This authentication method is supported by all servers and is the default authentication type.
POP_AUTH_APOP The APOP authentication method which uses an MD5 digest of the password. This method is not supported by all servers and should only be specified if required by the server.
lpszUserName
Points to a null-terminated string that specifies the user name to be used to authenticate the current client session.
lpszPassword
Points to a null-terminated string that specifies the password to be used to authenticate the current client session.

Return Value

If the function succeeds, the return value is zero. If the function fails, the return value is POP_ERROR. To get extended error information, call PopGetLastError.

Requirements

Client: Requires Windows Vista, Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
Header: Include cstools6.h.
Library: Use cspopav6.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

PopAsyncConnect, PopConnect, PopGetMessage, PopGetMessageCountEx, PopInitialize


Copyright © 2008 Catalyst Development Corporation. All rights reserved.