Fix: Try another fix to fix not attached files

This commit is contained in:
Laurent Destailleur 2012-02-01 22:39:17 +01:00
parent 19f8355231
commit ef60e8ccee
2 changed files with 9 additions and 6 deletions

View File

@ -185,11 +185,9 @@ class CMailFile
$this->addr_bcc = $addr_bcc; $this->addr_bcc = $addr_bcc;
$this->deliveryreceipt = $deliveryreceipt; $this->deliveryreceipt = $deliveryreceipt;
$smtp_headers = $this->write_smtpheaders(); $smtp_headers = $this->write_smtpheaders();
// TODO ? Add 'Date: ' . date("r") . "\r\n"; before X-Mailer
// TODO ? Add 'Message-ID: <' . time() . '.SMTPs@' . $host . ">\r\n"; before X-Mailer
// Define mime_headers // Define mime_headers
$mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list); //$mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list);
if (! empty($this->html)) if (! empty($this->html))
{ {
@ -587,6 +585,8 @@ class CMailFile
global $conf; global $conf;
$out = ""; $out = "";
$host = dol_getprefix();
// Sender // Sender
//$out .= "X-Sender: ".getValidAddress($this->addr_from,2).$this->eol; //$out .= "X-Sender: ".getValidAddress($this->addr_from,2).$this->eol;
$out .= "From: ".$this->getValidAddress($this->addr_from,0,1).$this->eol; $out .= "From: ".$this->getValidAddress($this->addr_from,0,1).$this->eol;
@ -602,6 +602,10 @@ class CMailFile
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $out .= "Disposition-Notification-To: ".$this->getValidAddress($this->addr_from,2).$this->eol; if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $out .= "Disposition-Notification-To: ".$this->getValidAddress($this->addr_from,2).$this->eol;
//$out .= "X-Priority: 3".$this->eol; //$out .= "X-Priority: 3".$this->eol;
$out.= 'Date: ' . date("r") . $this->eol;
$out.= 'Message-ID: <' . time() . '.phpmail@' . $host . ">" . $this->eol;
$out.= "X-Mailer: Dolibarr version " . DOL_VERSION ." (using php mail)".$this->eol; $out.= "X-Mailer: Dolibarr version " . DOL_VERSION ." (using php mail)".$this->eol;
$out.= "MIME-Version: 1.0".$this->eol; $out.= "MIME-Version: 1.0".$this->eol;

View File

@ -39,9 +39,8 @@
/** /**
* \class SMTPs * Class to construct and send SMTP compliant email, even
* \brief Class to construct and send SMTP compliant email, even * to a secure SMTP server, regardless of platform.
* to a secure SMTP server, regardless of platform.
*/ */
class SMTPs class SMTPs
{ {