ChangePassword Method  
 

Change the mailbox password for the specified user.

Syntax

object.ChangePassword( UserName, OldPassword, NewPassword )

Parameters

UserName
A string that specifies the username for the mailbox.
OldPassword
A string that specifies the current password for the user's mailbox. An error will be returned if this is an empty string.
NewPassword
A string that specifies the new password for the user's mailbox. An error will be returned if this is an empty string, or if the old and new password are the same value.

Return Value

A value of zero is returned if the method succeeds. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

The ChangePassword method changes the password that will be used to authenticate the specified user. If the UserName parameter is the same value as the UserName property, then successfully changing the password will cause the Password property to be updated with the new password

Note that in order to change the user's mailbox password, the server must be running the poppass service on port 106, on the same server. Because passwords are transmitted as clear text (unencrypted), this service is not considered secure and may not be available.

See Also

Password Property, UserName Property