Fix add protection to avoir fatal error 500

This commit is contained in:
Laurent Destailleur 2018-06-19 01:15:37 +02:00
parent 5d5083199f
commit 75dee7538b

View File

@ -657,6 +657,12 @@ class CMailFile
}
else if ($this->sendmode == 'smtps')
{
if (! is_object($this->smtps))
{
$this->error="Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."<br>Constructor of object CMailFile was not initialized without errors.";
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
return false;
}
// Use SMTPS library
// ------------------------------------------