From ce9a1b36618beac106cdc4eaa9dfe83d61396096 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:10:35 +0100 Subject: [PATCH] FIX: swiftmailer: correctly set errors-to header (#31826) --- htdocs/core/class/CMailFile.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index db8b30ed249..319969bbd18 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -577,7 +577,7 @@ class CMailFile 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 @@ class CMailFile $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));