forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into 11.0_https
This commit is contained in:
@@ -129,19 +129,32 @@ class CMailFile
|
||||
* @param string $css Css option
|
||||
* @param string $trackid Tracking string (contains type and id of related element)
|
||||
* @param string $moreinheader More in header. $moreinheader must contains the "\r\n" (TODO not supported for other MAIL_SEND_MODE different than 'phpmail' and 'smtps' for the moment)
|
||||
* @param string $sendcontext 'standard', 'emailing', ... (used to define with sending mode and parameters to use)
|
||||
* @param string $sendcontext 'standard', 'emailing', ... (used to define which sending mode and parameters to use)
|
||||
* @param string $replyto Reply-to email (will be set to same value than From by default if not provided)
|
||||
*/
|
||||
public 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 = '', $sendcontext = 'standard', $replyto = '')
|
||||
{
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user