scriptName = (!empty($GLOBALS['egw_info']['user']['preferences']['felamimail']['sieveScriptName']) ? $GLOBALS['egw_info']['user']['preferences']['felamimail']['sieveScriptName'] : 'felamimail'); $this->displayCharset = $GLOBALS['egw']->translation->charset(); if(is_a($_icServer,'defaultimap') && $_icServer->enableSieve) { $sieveHost = $_icServer->host; $sievePort = $_icServer->sievePort; $username = $_icServer->loginName; $password = $_icServer->password; $this->icServer = $_icServer; } else { die('Sieve not activated'); } if(PEAR::isError($this->error = $this->connect($sieveHost , $sievePort) ) ){ return false; } if(PEAR::isError($this->error = $this->login($username, $password) ) ){ return false; } } function getRules($_scriptName) { return $this->rules; } function getVacation($_scriptName) { return $this->vacation; } function setRules($_scriptName, $_rules) { $script =& CreateObject('felamimail.Script',$_scriptName); if($script->retrieveRules($this)) { $script->rules = $_rules; $script->updateScript($this); return true; } return false; } function setVacation($_scriptName, $_vacation) { $script =& CreateObject('felamimail.Script',$_scriptName); if($script->retrieveRules($this)) { $script->vacation = $_vacation; $script->updateScript($this); return true; } return false; } function retrieveRules($_scriptName) { $script =& CreateObject('felamimail.Script',$_scriptName); if($script->retrieveRules($this)) { $this->rules = $script->rules; $this->vacation = $script->vacation; return true; } return false; } } ?>