From 83a057fe25c148cf312e12e228c92aaeae8a6df4 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Sat, 20 Apr 2024 23:20:36 +0200 Subject: [PATCH] Fix bad verification for unwanted mail send (#29410) Co-authored-by: Hystepik --- htdocs/core/class/CMailFile.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 4d7da8fe848..0a9f799e8a7 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -398,7 +398,7 @@ class CMailFile $replacecc = false; $tabcc = explode(',', $addr_cc); foreach ($tabcc as $key => $cc) { - if (in_array($cc, $tabcc)) { + if (in_array($cc, $listofemailstonotsendto)) { unset($tabcc[$key]); $replacecc = true; } @@ -412,7 +412,7 @@ class CMailFile $replacebcc = false; $tabbcc = explode(',', $addr_bcc); foreach ($tabbcc as $key => $bcc) { - if (in_array($bcc, $tabbcc)) { + if (in_array($bcc, $listofemailstonotsendto)) { unset($tabbcc[$key]); $replacebcc = true; }