From eba65d8f39bd1129ce9c2b473be733acb09f7ce3 Mon Sep 17 00:00:00 2001 From: ainaraRT Date: Tue, 16 Jan 2024 13:38:52 +0000 Subject: [PATCH] If there's a template for the user send the mail --- .../stic_Web_Forms/Catcher/Donation/DonationMailer.php | 8 ++++++-- .../EventInscription/EventInscriptionMailer.php | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/stic_Web_Forms/Catcher/Donation/DonationMailer.php b/modules/stic_Web_Forms/Catcher/Donation/DonationMailer.php index 6beda7ad8a1..d039b0bee61 100644 --- a/modules/stic_Web_Forms/Catcher/Donation/DonationMailer.php +++ b/modules/stic_Web_Forms/Catcher/Donation/DonationMailer.php @@ -316,11 +316,15 @@ public function sendUserMail($templateId, $objWeb, $payment, $lang = null) // Function to parse the email $this->parsingEmail($templateId, $replacementObjects[1], $replacementObjects, $lang); - // End STIC 20231205 - ART // Send the mail $GLOBALS['log']->debug('Line ' . __LINE__ . ': ' . __METHOD__ . ": Sending mail..."); - return $this->send(); + + // If there's a template for the user send the mail + if(!empty($templateId)) { + return $this->send(); + } + // End STIC 20240116 - ART } // STIC 20230905 - ART - Enable custom email template for assigned user diff --git a/modules/stic_Web_Forms/Catcher/EventInscription/EventInscriptionMailer.php b/modules/stic_Web_Forms/Catcher/EventInscription/EventInscriptionMailer.php index c72ebdcc7d0..9fa50dc78a5 100644 --- a/modules/stic_Web_Forms/Catcher/EventInscription/EventInscriptionMailer.php +++ b/modules/stic_Web_Forms/Catcher/EventInscription/EventInscriptionMailer.php @@ -287,11 +287,15 @@ protected function __sendUserMail($templateId, $objContactWeb, $event, $inscript // Function to parse the email $this->parsingEmail($templateId, $account, $payment, $replacementObjects, $lang); - // End STIC 20230921 - ART - + // Send the mail $GLOBALS['log']->debug('Line ' . __LINE__ . ': ' . __METHOD__ . ": Sending mail ..."); - return $this->send(); + + // If there's a template for the user send the mail + if(!empty($templateId)) { + return $this->send(); + } + // End STIC 20240116 - ART }