diff --git a/include/class.ticket.php b/include/class.ticket.php index 673ddf309b66e8bbee6f5f9cf4901860ceb7e840..4b54f03a231c92dec51c76f7348bb5040bcabf48 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -782,6 +782,10 @@ class Ticket { $msg = $this->replaceVars($msg->asArray(), array('message' => $message)); $recipients=$sentlist=array(); + //Exclude the auto responding email just incase it's from staff member. + if ($message->isAutoResponse()) + $sentlist[] = $this->getEmail(); + //Alert admin?? if($cfg->alertAdminONNewTicket()) { $alert = str_replace('%{recipient}', 'Admin', $msg['body']); @@ -2151,8 +2155,8 @@ class Ticket { # Messages that are clearly auto-responses from email systems should # not have a return 'ping' message - if ($autorespond && $message && $message->isAutoReply()) - $autorespond=false; + if ($autorespond && $message->isAutoReply()) + $autorespond = false; //post canned auto-response IF any (disables new ticket auto-response). if ($vars['cannedResponseId'] @@ -2166,9 +2170,9 @@ class Ticket { if($autorespond && $dept && !$dept->autoRespONNewTicket()) $autorespond=false; - //Don't send alerts to staff when the message is an auto reply + //Don't send alerts to staff when the message is a bounce // this is necessary to avoid possible loop (especially on new ticket) - if ($alertstaff && $message->isAutoReply()) + if ($alertstaff && $message->isAutoBounce()) $alertstaff = false; /***** See if we need to send some alerts ****/