Skip to content

Commit

Permalink
FIX: swiftmailer: correctly set errors-to header (#31826)
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-dll authored Nov 15, 2024
1 parent 4feb9de commit ce9a1b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions htdocs/core/class/CMailFile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit ce9a1b3

Please sign in to comment.