2
0
forked from Wavyzz/dolibarr

Add log before sending email

This commit is contained in:
Laurent Destailleur
2023-02-16 02:59:29 +01:00
parent 27552f6706
commit ffa5806648

View File

@@ -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) {