Modification de l'errors-to

This commit is contained in:
Rodolphe Quiedeville 2005-01-05 11:07:12 +00:00
parent 1e46ef1e3f
commit 499c94b1d9

View File

@ -84,7 +84,6 @@ class DolibarrMail
$this->filename_list = array(); $this->filename_list = array();
dolibarr_syslog("DolibarrMail::DolibarrMail");
dolibarr_syslog("DolibarrMail::DolibarrMail to : ".$this->addr_to); dolibarr_syslog("DolibarrMail::DolibarrMail to : ".$this->addr_to);
dolibarr_syslog("DolibarrMail::DolibarrMail from : ".$this->from); dolibarr_syslog("DolibarrMail::DolibarrMail from : ".$this->from);
} }
@ -100,8 +99,6 @@ class DolibarrMail
{ {
$this->filename_list = $filename_list; $this->filename_list = $filename_list;
dolibarr_syslog("DolibarrMail::PrepareFile");
$this->mime_headers=""; $this->mime_headers="";
if (count($filename_list)) if (count($filename_list))
@ -178,7 +175,6 @@ class DolibarrMail
function sendfile() function sendfile()
{ {
dolibarr_syslog("DolibarrMail::sendfile");
$this->smtp_headers = $this->write_smtpheaders(); $this->smtp_headers = $this->write_smtpheaders();
@ -187,7 +183,15 @@ class DolibarrMail
$headers = $this->smtp_headers . $this->mime_headers; $headers = $this->smtp_headers . $this->mime_headers;
$message_comp = $this->text_body . $this->text_encoded; $message_comp = $this->text_body . $this->text_encoded;
if ($this->errors_to)
{
dolibarr_syslog("DolibarrMail::sendfile errorsto ".$this->errors_to);
$res = mail($this->addr_to,$this->subject,stripslashes($message_comp),$headers,"-f".$this->errors_to);
}
else
{
$res = mail($this->addr_to,$this->subject,stripslashes($message_comp),$headers); $res = mail($this->addr_to,$this->subject,stripslashes($message_comp),$headers);
}
return $res; return $res;
} }
@ -197,8 +201,6 @@ class DolibarrMail
*/ */
function write_to_file() function write_to_file()
{ {
dolibarr_syslog("DolibarrMail::write_to_file");
$this->smtp_headers = $this->write_smtpheaders(); $this->smtp_headers = $this->write_smtpheaders();
$this->text_body = $this->write_body(); $this->text_body = $this->write_body();
@ -279,8 +281,8 @@ class DolibarrMail
if($this->reply_to != "") if($this->reply_to != "")
$out = $out . "Reply-To: ".$this->reply_to."\n"; $out = $out . "Reply-To: ".$this->reply_to."\n";
if($this->errors_to != "") // if($this->errors_to != "")
$out = $out . "Errors-to: ".$this->errors_to."\n"; //$out = $out . "Errors-to: ".$this->errors_to."\n";
$out = $out . "X-Mailer: Dolibarr version " . DOL_VERSION ."\n"; $out = $out . "X-Mailer: Dolibarr version " . DOL_VERSION ."\n";
$out = $out . "X-Sender: $this->from\n"; $out = $out . "X-Sender: $this->from\n";