From ffa580664857d5a1f425f98be57a2d0467dd027c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 Feb 2023 02:59:29 +0100 Subject: [PATCH] Add log before sending email --- htdocs/core/class/CMailFile.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 4dd466d96ab..721e0582824 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -962,6 +962,8 @@ class CMailFile } if ($res) { + dol_syslog("CMailFile::sendfile: sendMsg, HOST=".$server.", PORT=".$conf->global->$keyforsmtpport, LOG_DEBUG); + if (!empty($conf->global->MAIN_MAIL_DEBUG)) { $this->smtps->setDebug(true); } @@ -1096,7 +1098,11 @@ class CMailFile //$this->logger = new Swift_Plugins_Loggers_EchoLogger(); $this->mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($this->logger)); } + + dol_syslog("CMailFile::sendfile: mailer->send, HOST=".$server.", PORT=".$conf->global->$keyforsmtpport, LOG_DEBUG); + // send mail + $failedRecipients = array(); try { $result = $this->mailer->send($this->message, $failedRecipients); } catch (Exception $e) {