| |
| INT WINAPI PopLogin(
|
| |
HCLIENT hClient, |
|
| |
UINT nAuthType, |
|
| |
LPCTSTR lpszUserName, |
|
| |
LPCTSTR lpszPassword |
|
| );
|
The PopLogin function authenticates the specified user in
on the 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 server.
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 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cstools7.h.
Library: Use cspopav7.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
PopAsyncConnect, PopConnect, PopGetMessage, PopGetMessageCountEx, PopInitialize
|
|