Fix regression in sending emails
This commit is contained in:
parent
e69616110d
commit
bd5c4603e3
@ -357,7 +357,7 @@ class CMailFile
|
|||||||
|
|
||||||
$smtps->setSubject($subjecttouse);
|
$smtps->setSubject($subjecttouse);
|
||||||
$smtps->setTO($this->getValidAddress($this->to, 0, 1));
|
$smtps->setTO($this->getValidAddress($this->to, 0, 1));
|
||||||
$smtps->setFrom($this->getValidAddress($this->from, 0, 1));
|
$smtps->setFrom($this->getValidAddress($this->addr_from, 0, 1));
|
||||||
$smtps->setTrackId($this->trackid);
|
$smtps->setTrackId($this->trackid);
|
||||||
$smtps->setReplyTo($this->getValidAddress($this->replyto, 0, 1));
|
$smtps->setReplyTo($this->getValidAddress($this->replyto, 0, 1));
|
||||||
|
|
||||||
@ -781,14 +781,14 @@ class CMailFile
|
|||||||
$from = $this->smtps->getFrom('org');
|
$from = $this->smtps->getFrom('org');
|
||||||
if ($res && !$from)
|
if ($res && !$from)
|
||||||
{
|
{
|
||||||
$this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."<br>Sender address '$from' invalid";
|
$this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport." - Sender address '$from' invalid";
|
||||||
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
|
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
|
||||||
$res = false;
|
$res = false;
|
||||||
}
|
}
|
||||||
$dest = $this->smtps->getTo();
|
$dest = $this->smtps->getTo();
|
||||||
if ($res && !$dest)
|
if ($res && !$dest)
|
||||||
{
|
{
|
||||||
$this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."<br>Recipient address '$dest' invalid";
|
$this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport." - Recipient address '$dest' invalid";
|
||||||
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
|
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
|
||||||
$res = false;
|
$res = false;
|
||||||
}
|
}
|
||||||
@ -811,7 +811,7 @@ class CMailFile
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (empty($this->error)) $this->error = $result;
|
if (empty($this->error)) $this->error = $result;
|
||||||
dol_syslog("CMailFile::sendfile: mail end error with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."<br>".$this->error, LOG_ERR);
|
dol_syslog("CMailFile::sendfile: mail end error with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport." - ".$this->error, LOG_ERR);
|
||||||
$res = false;
|
$res = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user