Horde_Smtp::setParam PHP Method

setParam() public method

Sets a configuration parameter value.
public setParam ( string $key, mixed $val )
$key string The param key.
$val mixed The param value.
    public function setParam($key, $val)
    {
        switch ($key) {
            case 'password':
                if ($val instanceof Horde_Smtp_Password) {
                    break;
                }
                // Encrypt password. DEPRECATED
                try {
                    $encrypt_key = $this->_getEncryptKey();
                    if (strlen($encrypt_key)) {
                        $secret = new Horde_Secret();
                        $val = $secret->write($encrypt_key, $val);
                        $this->_params['_passencrypt'] = true;
                    }
                } catch (Exception $e) {
                }
                break;
        }
        $this->_params[$key] = $val;
    }