[15/02/2025] Ajout d'un try/catch suite à messagerie pro OVH plus joignable via TLS depuis le 14/02/2025
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user