From 08862fb482f49fe5d35d4d7eac6a0fbb30274fff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Oct 2018 03:25:21 +0100 Subject: [PATCH] Log success of emails --- htdocs/core/actions_massactions.inc.php | 3 ++- htdocs/core/class/CMailFile.class.php | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index adf7b9b7c89..088ae69ebed 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -83,9 +83,10 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; - $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; + if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index a37f6b1562b..f64e18abb32 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -735,7 +735,11 @@ class CMailFile if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); $result=$this->smtps->getErrors(); - if (empty($this->error) && empty($result)) $res=true; + if (empty($this->error) && empty($result)) + { + dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); + $res=true; + } else { if (empty($this->error)) $this->error=$result; @@ -798,6 +802,10 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res=false; } + else + { + dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); + } } else {