From 9199989dec8099fe4daf2f224b1bd6b5a66fd682 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 17 Mar 2014 17:37:53 -0500
Subject: [PATCH] oops: No reply separator on diagnostic email

---
 include/class.mailer.php | 5 +++--
 scp/emailtest.php        | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/class.mailer.php b/include/class.mailer.php
index bb4e445d0..e91836d8a 100644
--- a/include/class.mailer.php
+++ b/include/class.mailer.php
@@ -157,8 +157,9 @@ class Mailer {
         $mid_token = (isset($options['thread']))
             ? $options['thread']->asMessageId($to) : '';
         if (!(isset($options['text']) && $options['text'])) {
-            if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()))
-                $message = "<div style=\"display:none\" data-mid=\"$mid_token\">$tag</div>"
+            if ($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator())
+                    && (!isset($options['reply-tag']) || $options['reply-tag']))
+                $message = "<div style=\"display:none\" data-mid=\"$mid_token\">$tag<br/><br/></div
                     .$message;
             // Make sure nothing unsafe has creeped into the message
             $message = Format::safe_html($message); //XXX??
diff --git a/scp/emailtest.php b/scp/emailtest.php
index 6a0787e37..83a896020 100644
--- a/scp/emailtest.php
+++ b/scp/emailtest.php
@@ -36,7 +36,8 @@ if($_POST){
 
     if(!$errors && $email){
         if($email->send($_POST['email'],$_POST['subj'],
-                Format::sanitize($_POST['message']))) {
+                Format::sanitize($_POST['message']),
+                null, array('reply-tag'=>false))) {
             $msg='Test email sent successfully to '.Format::htmlchars($_POST['email']);
             Draft::deleteForNamespace('email.diag');
         }
-- 
GitLab