Hi Guyz,
I have tried so many solutions looking at 20 to 30 thread on this topic. Unfortunately non of this helped me. Most of the threads (new topics) are very old. Below is my code in cpanel and config file. I know there must be something wrong with the code and i do not know where, i'm using hostmonster cpanel. I'm not an expert in coding but love to fix this for my mail. Please Help...
cPanel Code
_______________________________________
function password_save($curpas, $newpass)
{
$rcmail = rcmail::get_instance();
// Create a cPanel email object
$cPanel = new emailAccount($rcmail->config->get('password_cpanel_host'),
$rcmail->config->get('password_cpanel_username'),
$rcmail->config->get('password_cpanel_password'),
$rcmail->config->get('password_cpanel_port'),
$rcmail->config->get('password_cpanel_ssl'),
$rcmail->config->get('password_cpanel_theme'),
$_SESSION['username'] );
if ($cPanel->setPassword($newpass)){
return PASSWORD_SUCCESS;
}
else
{
return PASSWORD_ERROR;
}
}
// cPanel Driver options
// --------------------------
// The cPanel Host name
$config['password_cpanel_host'] = 'xxxx.hostmonster.com';
// The cPanel admin username
$config['password_cpanel_username'] = 'myusername';
// The cPanel admin password
$config['password_cpanel_password'] = 'mypass';
// The cPanel port to use
$config['password_cpanel_port'] = 2083;
// Using ssl for cPanel connections?
$config['password_cpanel_ssl'] = true;
// The cPanel theme in use
$config['password_cpanel_theme'] = 'hostmonster';