1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-19 04:41:53 +02:00

Added constant for mail-id header.

This commit is contained in:
Cameron
2014-10-23 04:35:42 -07:00
parent 8ec1569a4f
commit 0d4e4201e0
4 changed files with 14 additions and 5 deletions

View File

@@ -753,11 +753,12 @@ class e107Email extends PHPMailer
print_a($eml);
}
$identifier = deftrue('MAIL_IDENTIFIER', 'X-e107-id');
if (vartrue($eml['returnreceipt'])) $this->ConfirmReadingTo = $eml['returnreceipt'];
if (vartrue($eml['inline_images'])) $this->addInlineImages($eml['inline_images']);
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 (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)
$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->makeBody($message); // Add body, with conversion if required