CPopClient::ChangePassword Method  
 
BOOL ChangePassword(
  LPCTSTR lpszUserName,  
  LPCTSTR lpszOldPassword,  
  LPCTSTR lpszNewPassword  
);

The ChangePassword method changes the account password for the specified user.

Parameters

lpszUserName
Pointer to a string which specifies the user name of the account who's password will be changed. It is not required that this be the same user name that was used to login to the mail server.
lpszOldPassword
Pointer to a string which specifies the current account password.
lpszNewPassword
Pointer to a string which specifies the new account password. When the method returns, the user's mailbox password will be set to this value.

Return Value

If the method succeeds, it will return a non-zero value. If the method fails, it will return zero. To get extended error information, call GetLastError.

Remarks

The ChangePassword method is used to change the password associated with the specified account on the server. The method establishes a connection to a separate service running on the server, and does not use the POP3 protocol. For this method to succeed, the server must be configured to allow password changes using the "poppass" service, running on port 106.

Because passwords are sent over the network as clear text, this service is considered to be insecure.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cspopv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also