Skip to content
Snippets Groups Projects
Commit e0a86a5f authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1197 from greezybacon/issue/no-qr-mid-token


email: Always include a message-id token

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents c8ef0647 fd69753f
No related branches found
No related tags found
No related merge requests found
...@@ -176,10 +176,12 @@ class Mailer { ...@@ -176,10 +176,12 @@ class Mailer {
$mid_token = (isset($options['thread'])) $mid_token = (isset($options['thread']))
? $options['thread']->asMessageId($to) : ''; ? $options['thread']->asMessageId($to) : '';
if (!(isset($options['text']) && $options['text'])) { if (!(isset($options['text']) && $options['text'])) {
if ($cfg && $cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()) $tag = '';
if ($cfg && $cfg->stripQuotedReply()
&& (!isset($options['reply-tag']) || $options['reply-tag'])) && (!isset($options['reply-tag']) || $options['reply-tag']))
$message = "<div style=\"display:none\" $tag = $cfg->getReplySeparator() . '<br/><br/>';
data-mid=\"$mid_token\">$tag<br/><br/></div>$message"; $message = "<div style=\"display:none\"
data-mid=\"$mid_token\">$tag</div>$message";
$txtbody = rtrim(Format::html2text($message, 90, false)) $txtbody = rtrim(Format::html2text($message, 90, false))
. ($mid_token ? "\nRef-Mid: $mid_token\n" : ''); . ($mid_token ? "\nRef-Mid: $mid_token\n" : '');
$mime->setTXTBody($txtbody); $mime->setTXTBody($txtbody);
......
...@@ -245,7 +245,7 @@ class osTicket { ...@@ -245,7 +245,7 @@ class osTicket {
$email=$this->getConfig()->getDefaultEmail(); //will take the default email. $email=$this->getConfig()->getDefaultEmail(); //will take the default email.
if($email) { if($email) {
$email->sendAlert($to, $subject, $message, null, array('text'=>true)); $email->sendAlert($to, $subject, $message, null, array('text'=>true, 'reply-tag'=>false));
} else {//no luck - try the system mail. } else {//no luck - try the system mail.
Mailer::sendmail($to, $subject, $message, sprintf('"osTicket Alerts"<%s>',$to)); Mailer::sendmail($to, $subject, $message, sprintf('"osTicket Alerts"<%s>',$to));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment