Fix: add Return-Path for simplemail class for used the "error" mail or "form" mail to avoid feedback at www-data
This commit is contained in:
parent
c0af933262
commit
2e2a77c937
@ -293,6 +293,7 @@ class simplemail {
|
|||||||
if ( !empty($this->hfrom) ) $this->AddField2Header("From",$this->hfrom);
|
if ( !empty($this->hfrom) ) $this->AddField2Header("From",$this->hfrom);
|
||||||
|
|
||||||
if ( !empty($this->returnpath) ) $this->AddField2Header("Return-Path",$this->returnpath);
|
if ( !empty($this->returnpath) ) $this->AddField2Header("Return-Path",$this->returnpath);
|
||||||
|
else { $this->AddField2Header("Return-Path",$this->hfrom); }
|
||||||
|
|
||||||
if ( !empty($this->replyto) ) $this->AddField2Header("Reply-To",$this->replyto);
|
if ( !empty($this->replyto) ) $this->AddField2Header("Reply-To",$this->replyto);
|
||||||
|
|
||||||
|
|||||||
@ -231,6 +231,12 @@ class CMailFile
|
|||||||
|
|
||||||
$mail->XMailer = "Dolibarr version " . DOL_VERSION ." (using simplemail)";
|
$mail->XMailer = "Dolibarr version " . DOL_VERSION ." (using simplemail)";
|
||||||
|
|
||||||
|
// Add Errors-To
|
||||||
|
$mail->ErrorsTo = $this->getValidAddress($errors_to,1);
|
||||||
|
|
||||||
|
//Add Return-Path
|
||||||
|
$mail->returnpath = $this->getValidAddress($errors_to,1);
|
||||||
|
|
||||||
// Add from
|
// Add from
|
||||||
$this->addr_from = $from;
|
$this->addr_from = $from;
|
||||||
$mail->hfrom=$this->getValidAddress($this->addr_from,0,1);
|
$mail->hfrom=$this->getValidAddress($this->addr_from,0,1);
|
||||||
@ -771,7 +777,7 @@ class CMailFile
|
|||||||
}
|
}
|
||||||
if ($this->css['bgimage'])
|
if ($this->css['bgimage'])
|
||||||
{
|
{
|
||||||
// Todo: récupérer cid
|
// Todo: r<EFBFBD>cup<EFBFBD>rer cid
|
||||||
$out.= ' background-image: url("cid:'.$this->css['bgimage_cid'].'");';
|
$out.= ' background-image: url("cid:'.$this->css['bgimage_cid'].'");';
|
||||||
}
|
}
|
||||||
$out.= '}';
|
$out.= '}';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user