From 3fa00753b943e5ef8b2457a5f1c8e140e9fe56b4 Mon Sep 17 00:00:00 2001 From: simon <31130607+forgive38@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:50:41 +0100 Subject: [PATCH] pkp/pkp-lib#10468 resolve: co authors receive several e-mails when a decision is notified (#10479) Co-authored-by: simon --- classes/decision/types/traits/NotifyAuthors.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/decision/types/traits/NotifyAuthors.php b/classes/decision/types/traits/NotifyAuthors.php index 9302d1fbdcd..6acb54c781a 100644 --- a/classes/decision/types/traits/NotifyAuthors.php +++ b/classes/decision/types/traits/NotifyAuthors.php @@ -94,8 +94,10 @@ protected function sendAuthorEmail(Mailable $mailable, EmailData $email, User $e continue; } $mailable->to($author->getEmail(), $author->getFullName()); - Mail::send($mailable); - } + } + if ( sizeof($mailable->to) > 0 ) { + Mail::send($mailable); + } } }