diff --git a/include/class.template.php b/include/class.template.php
index 92cb61b54af382fad2fe5412f6d0feeb97bc66b1..8ff24503d8ac149bc658f02decfe9c8f0d029b39 100644
--- a/include/class.template.php
+++ b/include/class.template.php
@@ -100,6 +100,9 @@ class Template {
             case 'ticket_autoresp':
                  $tpl=array('subj'=>$this->ht['ticket_autoresp_subj'],'body'=>$this->ht['ticket_autoresp_body']);
                  break;
+            case 'ticket_autoreply':
+                 $tpl=array('subj'=>$this->ht['ticket_autoreply_subj'],'body'=>$this->ht['ticket_autoreply_body']);
+                 break;
             case 'msg_autoresp':
                  $tpl=array('subj'=>$this->ht['message_autoresp_subj'],'body'=>$this->ht['message_autoresp_body']);
                  break;
@@ -159,6 +162,10 @@ class Template {
         return $this->getMsgTemplate('ticket_autoresp');
     }
 
+    function getAutoReplyMsgTemplate() {
+        return $this->getMsgTemplate('ticket_autoreply');
+    }
+
     function getReplyMsgTemplate() {
         return $this->getMsgTemplate('ticket_reply');
     }
@@ -202,6 +209,9 @@ class Template {
             case 'ticket_autoresp':
                 $sql.=',ticket_autoresp_subj='.db_input($vars['subj']).',ticket_autoresp_body='.db_input($vars['body']);
                 break;
+            case 'ticket_autoreply':
+                $sql.=',ticket_autoreply_subj='.db_input($vars['subj']).',ticket_autoreply_body='.db_input($vars['body']);
+                break;
             case 'msg_autoresp':
                 $sql.=',message_autoresp_subj='.db_input($vars['subj']).',message_autoresp_body='.db_input($vars['body']);
                 break;
@@ -283,8 +293,10 @@ class Template {
     function message_templates(){
 
         //TODO: Make it database driven and dynamic
-        $messages=array('ticket_autoresp'=>array('name'=>'New Ticket Autoresponse',
+        $messages=array('ticket_autoresp'=>array('name'=>'New Ticket Auto-response',
                                                  'desc'=>'Autoresponse sent to user, if enabled, on new ticket.'),
+                        'ticket_autoreply'=>array('name'=>'New Ticket Auto-reply',
+                                                 'desc'=>'Canned Auto-reply sent to user on new ticket, based on filter matches. Overwrites "normal" auto-response.'),
                         'msg_autoresp'=>array('name'=>'New Message Auto-response',
                                               'desc'=>'Confirmation sent to user when a new message is appended to an existing ticket.'),
                         'ticket_notice'=>array('name'=>'New Ticket Notice',
@@ -365,6 +377,8 @@ class Template {
                 .' ,cfg_id='.db_input($ost->getConfigId())
                 .' ,ticket_autoresp_subj='.db_input($info['ticket_autoresp_subj'])
                 .' ,ticket_autoresp_body='.db_input($info['ticket_autoresp_body'])
+                .' ,ticket_autoreply_subj='.db_input($info['ticket_autoreply_subj'])
+                .' ,ticket_autoreply_body='.db_input($info['ticket_autoreply_body'])
                 .' ,ticket_notice_subj='.db_input($info['ticket_notice_subj'])
                 .' ,ticket_notice_body='.db_input($info['ticket_notice_body'])
                 .' ,ticket_alert_subj='.db_input($info['ticket_alert_subj'])
diff --git a/include/class.ticket.php b/include/class.ticket.php
index 477135e0e997fd95057bb35d6f6ac302579c663b..261bc253ff2e86730f0dd336ce8155dc2b58888b 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -1461,6 +1461,7 @@ class Ticket {
     }
 
     function postCannedReply($canned, $msgId, $alert=true) {
+        global $ost, $cfg;
 
         if((!is_object($canned) && !($canned=Canned::lookup($canned))) || !$canned->isEnabled())
             return false;
@@ -1473,7 +1474,38 @@ class Ticket {
                       'response' => $this->replaceVars($canned->getResponse()),
                       'cannedattachments' => $files);
 
-        return $this->postReply($info, $errors, $alert);
+        if(!($respId=$this->postReply($info, $errors, false)))
+            return false;
+
+        $this->markUnAnswered();
+
+        if(!$alert) return $respId;
+
+        $dept = $this->getDept();
+
+        if(!($tpl = $dept->getTemplate()))
+            $tpl= $cfg->getDefaultTemplate();
+
+        if(!$dept || !($email=$dept->getEmail()))
+            $email = $cfg->getDefaultEmail();
+
+        if($tpl && ($msg=$tpl->getAutoReplyMsgTemplate()) && $email) {
+
+            if($dept && $dept->isPublic())
+                $signature=$dept->getSignature();
+            else
+                $signature='';
+
+            $msg = $this->replaceVars($msg, array('response' => $info['response'], 'signature' => $signature));
+
+            if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()))
+                $msg['body'] ="\n$tag\n\n".$msg['body'];
+
+            $attachments =($cfg->emailAttachments() && $files)?$this->getAttachments($respId, 'R'):array();
+            $email->send($this->getEmail(), $msg['subj'], $msg['body'], $attachments);
+        }
+
+        return $respId;
     }
 
     /* public */ 
@@ -1487,7 +1519,7 @@ class Ticket {
 
         if($errors) return 0;
 
-        $poster = $thisstaff?$thisstaff->getName():'SYSTEM (Canned Response)';
+        $poster = $thisstaff?$thisstaff->getName():'SYSTEM (Canned Reply)';
 
         $sql='INSERT INTO '.TICKET_THREAD_TABLE.' SET created=NOW() '
             .' ,thread_type="R"'
diff --git a/include/upgrader/sql/f4da0c9b-00ff231f.patch.sql b/include/upgrader/sql/f4da0c9b-00ff231f.patch.sql
new file mode 100644
index 0000000000000000000000000000000000000000..2a28c82636ee7f3cd60cfb7e30cdff8c27edf645
--- /dev/null
+++ b/include/upgrader/sql/f4da0c9b-00ff231f.patch.sql
@@ -0,0 +1,17 @@
+/*
+ * @version=1.7RC2+
+ * 
+ * Add auto-reply template.
+ */
+
+ALTER TABLE  `%TABLE_PREFIX%email_template` 
+    ADD  `ticket_autoreply_subj` VARCHAR( 255 ) NOT NULL AFTER  `ticket_autoresp_body` ,
+    ADD  `ticket_autoreply_body` TEXT NOT NULL AFTER  `ticket_autoreply_subj`;
+
+UPDATE `%TABLE_PREFIX%email_template` 
+    SET `ticket_autoreply_subj`='Support Ticket Opened [#%{ticket.number}]',
+        `ticket_autoreply_body`='%{ticket.name},\r\n\r\nA request for support has been created and assigned ticket #%{ticket.number} with the following auto-reply:\r\n\r\n%{response}\r\n\r\n\r\nWe hope this response has sufficiently answered your questions. If not, please do not open another ticket. If need be, representative will follow-up with you as soon as possible.\r\n\r\nYou can view this ticket''s progress online here: %{ticket.client_link}.';
+
+ -- update schema signature
+UPDATE `%TABLE_PREFIX%config`
+    SET `schema_signature`='00ff231f2ade8797a0e7f2a7fccd52f4';
diff --git a/main.inc.php b/main.inc.php
index b007a5a4b53fbe43cb20967c323da94721311a4b..97500cde432d549d4513f462e8d825e3395874a8 100644
--- a/main.inc.php
+++ b/main.inc.php
@@ -63,7 +63,7 @@
 
     #Current version && schema signature (Changes from version to version)
     define('THIS_VERSION','1.7-RC2+'); //Shown on admin panel
-    define('SCHEMA_SIGNATURE','f4da0c9befa257b5a20a923d4e9c0e91'); //MD5 signature of the db schema. (used to trigger upgrades)
+    define('SCHEMA_SIGNATURE','00ff231f2ade8797a0e7f2a7fccd52f4'); //MD5 signature of the db schema. (used to trigger upgrades)
     #load config info
     $configfile='';
     if(file_exists(ROOT_DIR.'ostconfig.php')) //Old installs prior to v 1.6 RC5
diff --git a/setup/inc/sql/osTicket-mysql.sql b/setup/inc/sql/osTicket-mysql.sql
index ec886a23169af1a12164e6c78e58d8bde6f6af10..5d2f4ceefdb5d912ef5cf7b84f9b1e3a91508d75 100644
--- a/setup/inc/sql/osTicket-mysql.sql
+++ b/setup/inc/sql/osTicket-mysql.sql
@@ -289,6 +289,8 @@ CREATE TABLE `%TABLE_PREFIX%email_template` (
   `notes` text,
   `ticket_autoresp_subj` varchar(255) NOT NULL default '',
   `ticket_autoresp_body` text NOT NULL,
+  `ticket_autoreply_subj` varchar(255) NOT NULL default '',
+  `ticket_autoreply_body` text NOT NULL,
   `ticket_notice_subj` varchar(255) NOT NULL,
   `ticket_notice_body` text NOT NULL,
   `ticket_alert_subj` varchar(255) NOT NULL default '',
@@ -317,8 +319,8 @@ CREATE TABLE `%TABLE_PREFIX%email_template` (
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
 -- TODO: Dump revised copy before release!!!
-INSERT INTO `%TABLE_PREFIX%email_template` (`tpl_id`, `cfg_id`, `isactive`, `name`, `notes`, `ticket_autoresp_subj`, `ticket_autoresp_body`, `ticket_notice_subj`, `ticket_notice_body`, `ticket_alert_subj`, `ticket_alert_body`, `message_autoresp_subj`, `message_autoresp_body`, `message_alert_subj`, `message_alert_body`, `note_alert_subj`, `note_alert_body`, `assigned_alert_subj`, `assigned_alert_body`, `transfer_alert_subj`, `transfer_alert_body`, `ticket_overdue_subj`, `ticket_overdue_body`, `ticket_overlimit_subj`, `ticket_overlimit_body`, `ticket_reply_subj`, `ticket_reply_body`, `created`, `updated`) VALUES
-(1, 1, 1, 'osTicket Default Template', 'Default osTicket templates', 'Support Ticket Opened [#%{ticket.number}]', '%{ticket.name},\r\n\r\nA request for support has been created and assigned ticket #%{ticket.number}. A representative will follow-up with you as soon as possible.\r\n\r\nYou can view this ticket''s progress online here: %{ticket.client_link}.\r\n\r\nIf you wish to send additional comments or information regarding this issue, please don''t open a new ticket. Simply login using the link above and update the ticket.\r\n\r\n%{signature}', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nOur customer care team has created a ticket, #%{ticket.number} on your behalf, with the following message.\r\n\r\n%{message}\r\n\r\nIf you wish to provide additional comments or information regarding this issue, please don''t open a new ticket. You can update or view this ticket''s progress online here: %{ticket.client_link}.\r\n\r\n%{signature}', 'New Ticket Alert', '%{recipient},\r\n\r\nNew ticket #%{ticket.number} created.\r\n\r\n-----------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n-----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', '[#%{ticket.number}] Message Added', '%{ticket.name},\r\n\r\nYour reply to support request #%{ticket.number} has been noted.\r\n\r\nYou can view this support request progress online here: %{ticket.client_link}.\r\n\r\n%{signature}', 'New Message Alert', '%{recipient},\r\n\r\nNew message appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'New Internal Note Alert', '%{recipient},\r\n\r\nInternal note appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\n* %{note.title} *\r\n\r\n%{note.message}\r\n----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Ticket #%{ticket.number} Assigned to you', '%{assignee},\r\n\r\nTicket #%{ticket.number} has been assigned to you by %{assigner}\r\n\r\n----------------------\r\n\r\n%{comments}\r\n\r\n----------------------\r\n\r\nTo view complete details, simply login to the support system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Support Ticket System - powered by osTicket.', 'Ticket Transfer #%{ticket.number} - %{ticket.dept.name}', '%{recipient},\r\n\r\nTicket #%{ticket.number} has been transferred to %{ticket.dept.name} department by %{staff.name}\r\n\r\n----------------------\r\n\r\n%{comments}\r\n\r\n----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Stale Ticket Alert', '%{recipient},\r\n\r\nA ticket, #%{ticket.number} assigned to you or in your department is seriously overdue.\r\n\r\n%{ticket.staff_link}\r\n\r\nWe should all work hard to guarantee that all tickets are being addressed in a timely manner.\r\n\r\n- Your friendly (although with limited patience) Support Ticket System - powered by osTicket.', 'Open Tickets Limit Reached', '%{ticket.name}\r\n\r\nYou have reached the maximum number of open tickets allowed.\r\n\r\nTo be able to open another ticket, one of your pending tickets must be closed. To update or add comments to an open ticket simply login using the link below.\r\n\r\n%{url}/tickets.php?e=%{ticket.email}\r\n\r\nThank you.\r\n\r\nSupport Ticket System', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nA customer support staff member has replied to your support request, #%{ticket.number} with the following response:\r\n\r\n%{response}\r\n\r\nWe hope this response has sufficiently answered your questions. If not, please do not send another email. Instead, reply to this email or login to your account for a complete archive of all your support requests and responses.\r\n\r\n%{ticket.client_link}\r\n\r\n%{signature}', NOW(), NOW());
+INSERT INTO `%TABLE_PREFIX%email_template` (`tpl_id`, `cfg_id`, `isactive`, `name`, `notes`, `ticket_autoresp_subj`, `ticket_autoresp_body`, `ticket_autoreply_subj`, `ticket_autoreply_body`, `ticket_notice_subj`, `ticket_notice_body`, `ticket_alert_subj`, `ticket_alert_body`, `message_autoresp_subj`, `message_autoresp_body`, `message_alert_subj`, `message_alert_body`, `note_alert_subj`, `note_alert_body`, `assigned_alert_subj`, `assigned_alert_body`, `transfer_alert_subj`, `transfer_alert_body`, `ticket_overdue_subj`, `ticket_overdue_body`, `ticket_overlimit_subj`, `ticket_overlimit_body`, `ticket_reply_subj`, `ticket_reply_body`, `created`, `updated`) VALUES
+(1, 1, 1, 'osTicket Default Template', 'Default osTicket templates', 'Support Ticket Opened [#%{ticket.number}]', '%{ticket.name},\r\n\r\nA request for support has been created and assigned ticket #%{ticket.number}. A representative will follow-up with you as soon as possible.\r\n\r\nYou can view this ticket''s progress online here: %{ticket.client_link}.\r\n\r\nIf you wish to send additional comments or information regarding this issue, please don''t open a new ticket. Simply login using the link above and update the ticket.\r\n\r\n%{signature}', 'Support Ticket Opened [#%{ticket.number}]', '%{ticket.name},\r\n\r\nA request for support has been created and assigned ticket #%{ticket.number} with the following auto-reply:\r\n\r\n%{response}\r\n\r\n\r\nWe hope this response has sufficiently answered your questions. If not, please do not open another ticket. If need be, representative will follow-up with you as soon as possible.\r\n\r\nYou can view this ticket''s progress online here: %{ticket.client_link}.', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nOur customer care team has created a ticket, #%{ticket.number} on your behalf, with the following message.\r\n\r\n%{message}\r\n\r\nIf you wish to provide additional comments or information regarding this issue, please don''t open a new ticket. You can update or view this ticket''s progress online here: %{ticket.client_link}.\r\n\r\n%{signature}', 'New Ticket Alert', '%{recipient},\r\n\r\nNew ticket #%{ticket.number} created.\r\n\r\n-----------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n-----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', '[#%{ticket.number}] Message Added', '%{ticket.name},\r\n\r\nYour reply to support request #%{ticket.number} has been noted.\r\n\r\nYou can view this support request progress online here: %{ticket.client_link}.\r\n\r\n%{signature}', 'New Message Alert', '%{recipient},\r\n\r\nNew message appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'New Internal Note Alert', '%{recipient},\r\n\r\nInternal note appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\n* %{note.title} *\r\n\r\n%{note.message}\r\n----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Ticket #%{ticket.number} Assigned to you', '%{assignee},\r\n\r\nTicket #%{ticket.number} has been assigned to you by %{assigner}\r\n\r\n----------------------\r\n\r\n%{comments}\r\n\r\n----------------------\r\n\r\nTo view complete details, simply login to the support system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Support Ticket System - powered by osTicket.', 'Ticket Transfer #%{ticket.number} - %{ticket.dept.name}', '%{recipient},\r\n\r\nTicket #%{ticket.number} has been transferred to %{ticket.dept.name} department by %{staff.name}\r\n\r\n----------------------\r\n\r\n%{comments}\r\n\r\n----------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{ticket.staff_link}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Stale Ticket Alert', '%{recipient},\r\n\r\nA ticket, #%{ticket.number} assigned to you or in your department is seriously overdue.\r\n\r\n%{ticket.staff_link}\r\n\r\nWe should all work hard to guarantee that all tickets are being addressed in a timely manner.\r\n\r\n- Your friendly (although with limited patience) Support Ticket System - powered by osTicket.', 'Open Tickets Limit Reached', '%{ticket.name}\r\n\r\nYou have reached the maximum number of open tickets allowed.\r\n\r\nTo be able to open another ticket, one of your pending tickets must be closed. To update or add comments to an open ticket simply login using the link below.\r\n\r\n%{url}/tickets.php?e=%{ticket.email}\r\n\r\nThank you.\r\n\r\nSupport Ticket System', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nA customer support staff member has replied to your support request, #%{ticket.number} with the following response:\r\n\r\n%{response}\r\n\r\nWe hope this response has sufficiently answered your questions. If not, please do not send another email. Instead, reply to this email or login to your account for a complete archive of all your support requests and responses.\r\n\r\n%{ticket.client_link}\r\n\r\n%{signature}', NOW(), NOW());
 
 DROP TABLE IF EXISTS `%TABLE_PREFIX%file`;
 CREATE TABLE `%TABLE_PREFIX%file` (
diff --git a/setup/inc/sql/osTicket-mysql.sql.md5 b/setup/inc/sql/osTicket-mysql.sql.md5
index d6d0340e6558e27fc296c43407e88191f3430e99..4aa4254e6af1e5496dc39cf89726de1a607bab14 100644
--- a/setup/inc/sql/osTicket-mysql.sql.md5
+++ b/setup/inc/sql/osTicket-mysql.sql.md5
@@ -1 +1 @@
-f4da0c9befa257b5a20a923d4e9c0e91
+00ff231f2ade8797a0e7f2a7fccd52f4