diff --git a/include/class.dept.php b/include/class.dept.php index 90cbe3a4b72088cc2257dacc03de6a13aaabd5d2..f7b39c6e40e9069f07d6870245454d83f8507b4a 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -55,7 +55,6 @@ implements TemplateVariable { var $config; var $template; - var $email; var $autorespEmail; const ALERTS_DISABLED = 2; @@ -128,13 +127,10 @@ implements TemplateVariable { function getAlertEmail() { global $cfg; - if (!$this->email && ($id = $this->getEmailId())) { - $this->email = Email::lookup($id); - } - if (!$this->email && $cfg) { - $this->email = $cfg->getAlertEmail(); - } - return $this->email; + if ($this->email) + return $this->email; + + return $cfg ? $cfg->getDefaultEmail() : null; } function getEmail() {