diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index db8b30ed2497a..319969bbd188c 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -577,7 +577,7 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array() if (!empty($this->errors_to)) { try { - $headers->addTextHeader('Errors-To', $this->getArrayAddress($this->errors_to)); + $headers->addTextHeader('Errors-To', $this->getValidAddress($this->errors_to, 0)); } catch (Exception $e) { $this->errors[] = $e->getMessage(); } @@ -644,7 +644,6 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array() $this->errors[] = $e->getMessage(); } } - //if (!empty($this->errors_to)) $this->message->setErrorsTo($this->getArrayAddress($this->errors_to)); if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) { try { $this->message->setReadReceiptTo($this->getArrayAddress($this->addr_from));