function save($currpass, $newpass)
    {
        // get config
        $rcmail = rcmail::get_instance();
        $host   = $rcmail->config->get('password_plesk_host');
        $user   = $rcmail->config->get('password_plesk_user');
        $pass   = $rcmail->config->get('password_plesk_pass');
        $port   = $rcmail->config->get('password_plesk_rpc_port');
        $path   = $rcmail->config->get('password_plesk_rpc_path');

        // create plesk-object
        $plesk = new plesk_rpc;
        $plesk->init($host, $port, $path, $user, $pass);

        // try to change password and return the status
        $result = $plesk->change_mailbox_password($_SESSION['username'], $newpass);
        //$plesk->destroy();

        if ($result) {
            return PASSWORD_SUCCESS;
        }

        return PASSWORD_ERROR;
    }