Log success of emails

This commit is contained in:
Laurent Destailleur 2018-10-29 03:25:21 +01:00
parent b4600fdc06
commit 08862fb482
2 changed files with 11 additions and 2 deletions

View File

@ -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;
}

View File

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