From ef60e8ccee9fbeceaaa63c077be5fc2e0bb601f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Feb 2012 22:39:17 +0100 Subject: [PATCH] Fix: Try another fix to fix not attached files --- htdocs/core/class/CMailFile.class.php | 10 +++++++--- htdocs/core/class/smtps.class.php | 5 ++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index c7cb21883a2..9b225b5933b 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -185,11 +185,9 @@ class CMailFile $this->addr_bcc = $addr_bcc; $this->deliveryreceipt = $deliveryreceipt; $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 - $mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list); + //$mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list); if (! empty($this->html)) { @@ -587,6 +585,8 @@ class CMailFile global $conf; $out = ""; + $host = dol_getprefix(); + // Sender //$out .= "X-Sender: ".getValidAddress($this->addr_from,2).$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; //$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.= "MIME-Version: 1.0".$this->eol; diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 19ad6d18fcc..d420062d118 100755 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -39,9 +39,8 @@ /** - * \class SMTPs - * \brief Class to construct and send SMTP compliant email, even - * to a secure SMTP server, regardless of platform. + * Class to construct and send SMTP compliant email, even + * to a secure SMTP server, regardless of platform. */ class SMTPs {