diff --git a/include/class.mailer.php b/include/class.mailer.php
index 44e7565b6438631dfe79be65b3f5d5a941745a08..d9f8de6c138137155a7f452101db31183e1b5fef 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 7f0c73109f2d1451203cf870c9028fc04367116f..daf4d0cbda925e43e6c81d86e4a041bfcb33adeb 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) {