From d36fea7b7b81449d291c1e04fdfa31456280f743 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 28 Oct 2013 21:38:20 +0000 Subject: [PATCH] Disambiguate Reply-To from In-Reply-To mailer opts Previous the options defined for the Mailer::send() function were confusing when sending an In-Reply-To header --- include/class.mailer.php | 4 ++-- include/class.ticket.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/class.mailer.php b/include/class.mailer.php index 44e7565b6..d9f8de6c1 100644 --- a/include/class.mailer.php +++ b/include/class.mailer.php @@ -124,8 +124,8 @@ class Mailer { } if ($options) { - if (isset($options['replyto']) && $options['replyto']) - $headers += array('In-Reply-To' => $options['replyto']); + if (isset($options['inreplyto']) && $options['inreplyto']) + $headers += array('In-Reply-To' => $options['inreplyto']); if (isset($options['references']) && $options['references']) { if (is_array($options['references'])) $headers += array('References' => diff --git a/include/class.ticket.php b/include/class.ticket.php index 7f0c73109..daf4d0cbd 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -738,7 +738,7 @@ class Ticket { $email =$cfg->getDefaultEmail(); $options = array( - 'replyto'=>$message->getEmailMessageId(), + 'inreplyto'=>$message->getEmailMessageId(), 'references'=>$message->getEmailReferences()); //Send auto response - if enabled. @@ -889,7 +889,7 @@ class Ticket { if (!$message) $message = $this->getLastMessage(); $options = array( - 'replyto'=>$message->getEmailMessageId(), + 'inreplyto'=>$message->getEmailMessageId(), 'references'=>$message->getEmailReferences()); $email->sendAutoReply($this->getEmail(), $msg['subj'], $msg['body'], null, $options); @@ -950,7 +950,7 @@ class Ticket { //Send the alerts. $sentlist=array(); $options = array( - 'replyto'=>$note->getEmailMessageId(), + 'inreplyto'=>$note->getEmailMessageId(), 'references'=>$note->getEmailReferences()); foreach( $recipients as $k=>$staff) { if(!is_object($staff) || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue; @@ -1203,7 +1203,7 @@ class Ticket { $sentlist=array(); $options = array( - 'replyto'=>$note->getEmailMessageId(), + 'inreplyto'=>$note->getEmailMessageId(), 'references'=>$note->getEmailReferences()); foreach( $recipients as $k=>$staff) { if(!is_object($staff) || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue; @@ -1355,7 +1355,7 @@ class Ticket { $sentlist=array(); //I know it sucks...but..it works. $options = array( - 'replyto'=>$message->getEmailMessageId(), + 'inreplyto'=>$message->getEmailMessageId(), 'references'=>$message->getEmailReferences()); foreach( $recipients as $k=>$staff) { if(!$staff || !$staff->getEmail() || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue; @@ -1415,7 +1415,7 @@ class Ticket { $attachments =($cfg->emailAttachments() && $files)?$response->getAttachments():array(); $options = array( - 'replyto'=>$response->getEmailMessageId(), + 'inreplyto'=>$response->getEmailMessageId(), 'references'=>$response->getEmailReferences()); $email->sendAutoReply($this->getEmail(), $msg['subj'], $msg['body'], $attachments, $options); @@ -1474,7 +1474,7 @@ class Ticket { //Set attachments if emailing. $attachments = $cfg->emailAttachments()?$response->getAttachments():array(); $options = array( - 'replyto' => $response->getEmailMessageId(), + 'inreplyto' => $response->getEmailMessageId(), 'references' => $response->getEmailReferences()); //TODO: setup 5 param (options... e.g mid trackable on replies) $email->send($this->getEmail(), $msg['subj'], $msg['body'], $attachments, @@ -1588,7 +1588,7 @@ class Ticket { $attachments = $note->getAttachments(); $options = array( - 'replyto'=>$note->getEmailMessageId(), + 'inreplyto'=>$note->getEmailMessageId(), 'references'=>$note->getEmailReferences()); $sentlist=array(); foreach( $recipients as $k=>$staff) { -- GitLab