From a5fce6cca8879166f9af29eda8821d4e57dabf57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2019 18:25:54 +0200 Subject: [PATCH] Update CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index b9f428d9f43..da5e1ebc1a3 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -136,12 +136,25 @@ class CMailFile { global $conf, $dolibarr_main_data_root; + $this->subject = $subject; + $this->addr_to = $to; + $this->addr_from = $from; + $this->msg = $msg; + $this->filename_list = $filename_list; + $this->mimetype_list = $mimetype_list; + $this->mimefilename_list = $mimefilename_list; + $this->addr_cc = $addr_cc; + $this->addr_bcc = $addr_bcc; + $this->deliveryreceipt = $deliveryreceipt; + if (empty($replyto)) $replyto = $from; + $this->reply_to = $replyto; + $this->errors_to = $errors_to; + $this->trackid = $trackid; $this->sendcontext = $sendcontext; $this->filename_list = $filename_list; $this->mimetype_list = $mimetype_list; $this->mimefilename_list = $mimefilename_list; - if (empty($replyto)) $replyto=$from; // Define this->sendmode $this->sendmode = ''; @@ -262,16 +275,6 @@ class CMailFile $files_encoded = ""; // Define smtp_headers - $this->subject = $subject; - $this->addr_from = $from; - $this->reply_to = $replyto; - $this->errors_to = $errors_to; - $this->addr_to = $to; - $this->addr_cc = $addr_cc; - $this->addr_bcc = $addr_bcc; - $this->deliveryreceipt = $deliveryreceipt; - $this->trackid = $trackid; - $smtp_headers = $this->write_smtpheaders(); if (! empty($moreinheader)) $smtp_headers.=$moreinheader; // $moreinheader contains the \r\n