mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Added constant for mail-id header.
This commit is contained in:
@@ -724,6 +724,11 @@ else
|
|||||||
define('XURL_VIMEO', false);
|
define('XURL_VIMEO', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!defined('MAIL_IDENTIFIER'))
|
||||||
|
{
|
||||||
|
define('MAIL_IDENTIFIER', 'X-e107-id');
|
||||||
|
}
|
||||||
|
|
||||||
/* Withdrawn 0.8
|
/* Withdrawn 0.8
|
||||||
// legacy module.php file loading.
|
// legacy module.php file loading.
|
||||||
if (isset($pref['modules']) && $pref['modules']) {
|
if (isset($pref['modules']) && $pref['modules']) {
|
||||||
|
@@ -447,6 +447,7 @@ class mailout_main_ui extends e_admin_ui
|
|||||||
$sendto = trim($_POST['testaddress']);
|
$sendto = trim($_POST['testaddress']);
|
||||||
|
|
||||||
$eml = array(
|
$eml = array(
|
||||||
|
'e107_header' => 9999999,
|
||||||
'subject' => LAN_MAILOUT_113." ".$add,
|
'subject' => LAN_MAILOUT_113." ".$add,
|
||||||
'body' => str_replace("[br]", "\n", LAN_MAILOUT_114),
|
'body' => str_replace("[br]", "\n", LAN_MAILOUT_114),
|
||||||
'template' => vartrue($_POST['testtemplate'],null),
|
'template' => vartrue($_POST['testtemplate'],null),
|
||||||
|
@@ -44,8 +44,8 @@ class e107Bounce
|
|||||||
$head = BounceHandler::parse_head($strEmail);
|
$head = BounceHandler::parse_head($strEmail);
|
||||||
$message = null;
|
$message = null;
|
||||||
|
|
||||||
|
$identifier = deftrue('MAIL_IDENTIFIER', 'X-e107-id');
|
||||||
$e107_userid = (isset($head['X-e107-id'])) ? $head['X-e107-id'] : $this->getHeader($strEmail,'X-e107-id');
|
$e107_userid = (isset($head[$identifier])) ? $head[$identifier] : $this->getHeader($strEmail, $identifier);
|
||||||
|
|
||||||
if($_E107['debug'])
|
if($_E107['debug'])
|
||||||
{
|
{
|
||||||
@@ -97,7 +97,7 @@ class e107Bounce
|
|||||||
|
|
||||||
foreach($multiArray as $the)
|
foreach($multiArray as $the)
|
||||||
{
|
{
|
||||||
$the['user_id'] = $head['X-e107-id'];
|
$the['user_id'] = $head[$identifier];
|
||||||
$the['user_email'] = $the['recipient'];
|
$the['user_email'] = $the['recipient'];
|
||||||
unset($the['recipient']);
|
unset($the['recipient']);
|
||||||
|
|
||||||
|
@@ -753,11 +753,12 @@ class e107Email extends PHPMailer
|
|||||||
print_a($eml);
|
print_a($eml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$identifier = deftrue('MAIL_IDENTIFIER', 'X-e107-id');
|
||||||
|
|
||||||
if (vartrue($eml['returnreceipt'])) $this->ConfirmReadingTo = $eml['returnreceipt'];
|
if (vartrue($eml['returnreceipt'])) $this->ConfirmReadingTo = $eml['returnreceipt'];
|
||||||
if (vartrue($eml['inline_images'])) $this->addInlineImages($eml['inline_images']);
|
if (vartrue($eml['inline_images'])) $this->addInlineImages($eml['inline_images']);
|
||||||
if (vartrue($eml['priority'])) $this->Priority = $eml['priority'];
|
if (vartrue($eml['priority'])) $this->Priority = $eml['priority'];
|
||||||
if (vartrue($eml['e107_header'])) $this->AddCustomHeader("X-e107-id: {$eml['e107_header']}");
|
if (vartrue($eml['e107_header'])) $this->AddCustomHeader($identifier.": {$eml['e107_header']}");
|
||||||
if (vartrue($eml['extra_header']))
|
if (vartrue($eml['extra_header']))
|
||||||
{
|
{
|
||||||
if (is_array($eml['extra_header']))
|
if (is_array($eml['extra_header']))
|
||||||
@@ -1119,8 +1120,10 @@ function sendemail($send_to, $subject, $message, $to_name='', $send_from='', $fr
|
|||||||
|
|
||||||
// Create a mailer object of the correct type (which auto-fills in sending method, server details)
|
// Create a mailer object of the correct type (which auto-fills in sending method, server details)
|
||||||
$mail = new e107Email($overrides);
|
$mail = new e107Email($overrides);
|
||||||
|
|
||||||
|
$identifier = deftrue('MAIL_IDENTIFIER', 'X-e107-id');
|
||||||
|
|
||||||
if (varsettrue($mailheader_e107id)) $mail->AddCustomHeader("X-e107-id: {$mailheader_e107id}");
|
if (varsettrue($mailheader_e107id)) $mail->AddCustomHeader($identifier.": {$mailheader_e107id}");
|
||||||
|
|
||||||
$mail->legacyBody = TRUE; // Need to handle plain text email conversion to HTML
|
$mail->legacyBody = TRUE; // Need to handle plain text email conversion to HTML
|
||||||
$mail->makeBody($message); // Add body, with conversion if required
|
$mail->makeBody($message); // Add body, with conversion if required
|
||||||
|
Reference in New Issue
Block a user