From e60088a2976dd4049fadb3c2745b6ff4af29adc0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Mar 2016 13:29:43 +0100 Subject: [PATCH] Add parameter moreinheader --- htdocs/core/class/CMailFile.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 39d28b55311..5fb15ef1ec1 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -103,8 +103,9 @@ class CMailFile * @param string $errors_to Email for errors-to * @param string $css Css option * @param string $trackid Tracking string + * @param string $moreinheader More in header (for phpmail only for the moment) */ - function __construct($subject,$to,$from,$msg,$filename_list=array(),$mimetype_list=array(),$mimefilename_list=array(),$addr_cc="",$addr_bcc="",$deliveryreceipt=0,$msgishtml=0,$errors_to='',$css='',$trackid='') + function __construct($subject,$to,$from,$msg,$filename_list=array(),$mimetype_list=array(),$mimefilename_list=array(),$addr_cc="",$addr_bcc="",$deliveryreceipt=0,$msgishtml=0,$errors_to='',$css='',$trackid='',$moreinheader='') { global $conf; @@ -199,7 +200,8 @@ class CMailFile $this->deliveryreceipt = $deliveryreceipt; $this->trackid = $trackid; $smtp_headers = $this->write_smtpheaders(); - + if (! empty($moreinheader)) $smtp_headers.=$moreinheader; + // Define mime_headers $mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list); @@ -259,7 +261,7 @@ class CMailFile $smtps->setFrom($this->getValidAddress($from,0,1)); $smtps->setTrackId($trackid); $smtps->setReplyTo($this->getValidAddress($from,0,1)); // Set property with this->smtps->setReplyTo after constructor if you want to use another value than the From - + if (! empty($this->html)) { if (!empty($css))