Skip to content
Snippets Groups Projects
Commit 9d09973c authored by Jared Hancock's avatar Jared Hancock
Browse files

mail: No auto responses for auto-reply mails

This requires extra processing in the mail backend, perhaps through a
plugin, which would detect and flag a message as an auto-reply. Auto-replies
are added to the ticket thread, but have the automated responses disabled.
parent a00876a2
No related branches found
No related tags found
No related merge requests found
......@@ -1596,7 +1596,9 @@ class Ticket {
if(!$alerts) return $message; //Our work is done...
// Do not auto-respond to bounces and other auto-replies
$autorespond = isset($vars['flags']) ? !$vars['flags']['bounce'] : true;
$autorespond = isset($vars['flags'])
? !$vars['flags']['bounce'] && !$vars['flags']['auto-reply']
: true;
if ($autorespond && $message->isAutoReply())
$autorespond = false;
......@@ -1843,9 +1845,12 @@ class Ticket {
if(!($note=$this->getThread()->addNote($vars, $errors)))
return null;
if (isset($vars['flags']) && $vars['flags']['bounce'])
// No alerts for bounce emails
$alert = false;
$alert = $alert && (
isset($vars['flags'])
// No alerts for bounce and auto-reply emails
? !$vars['flags']['bounce'] && !$vars['flags']['auto-reply']
: true
);
// Get assigned staff just in case the ticket is closed.
$assignee = $this->getStaff();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment