From 9aa1f0fd7ed0072b1e39c2e605e474c9ea171653 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 28 Oct 2022 17:42:45 -0500 Subject: [PATCH] Fix emission of repeated email addresses This bug was discovered when support for checking for repeated email addresses was developed for the testsuite. --- gatekeeper.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index f3a0708..3011c77 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1069,7 +1069,8 @@ sub mail { ftp_abort("FATAL: SMTP connection failed") unless $smtp; $smtp->mail($sender); - $smtp->bcc($email_always) if ($send_to_user); + $smtp->bcc($email_always) + if ($send_to_user && !grep $_ eq $email_always, @email_list); $smtp->recipient(@email_list, { SkipBad => 1}); $smtp->data(); -- 2.25.1