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:
Regis Houssin 2009-09-23 17:06:56 +00:00
parent c0af933262
commit 2e2a77c937
2 changed files with 8 additions and 1 deletions

View File

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

View File

@ -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.= '}';