Merge pull request #11992 from frederic34/patch-12

Update CMailFile.class.php
This commit is contained in:
Laurent Destailleur 2019-09-30 18:36:03 +02:00 committed by GitHub
commit 97f4cc547f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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