From e7041ba84d1ff4c8771b96ce29868dc28082e327 Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Sat, 15 Feb 2025 11:01:26 +0100 Subject: [PATCH] =?UTF-8?q?[15/02/2025]=20Ajout=20d'un=20try/catch=20suite?= =?UTF-8?q?=20=C3=A0=20messagerie=20pro=20OVH=20plus=20joignable=20via=20T?= =?UTF-8?q?LS=20depuis=20le=2014/02/2025?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Thelia/Mailer/MailerFactory.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Mailer/MailerFactory.php b/core/lib/Thelia/Mailer/MailerFactory.php index a59ad400..8c14569a 100644 --- a/core/lib/Thelia/Mailer/MailerFactory.php +++ b/core/lib/Thelia/Mailer/MailerFactory.php @@ -162,8 +162,17 @@ class MailerFactory if (! empty($to)) { $instance = $this->createEmailMessage($messageCode, $from, $to, $messageParameters, $locale, $cc, $bcc); - $sentCount = $this->send($instance, $failedRecipients); + try { + $instance = $this->createEmailMessage($messageCode, $from, $to, $messageParameters, $locale, $cc, $bcc, $replyTo); + $sentCount = $this->send($instance, $failedRecipients); + } catch (\Exception $ex) { + Tlog::getInstance()->addError( + "Error while sending email message $messageCode: ".$ex->getMessage() + ); + } + +// $sentCount = $this->send($instance, $failedRecipients); if ($sentCount == 0) { Tlog::getInstance()->addError( Translator::getInstance()->trans(