diff --git a/include/class.thread.php b/include/class.thread.php index 89a5d0af571a9645e39b570c147810ba5065632f..2fda4bcae682487687a6ea162a2f32454a82dd24 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -575,6 +575,7 @@ Class ThreadEntry { 'ip' => '', 'reply_to' => $this, ); + $errors = array(); if (isset($mailinfo['attachments'])) $vars['attachments'] = $mailinfo['attachments']; @@ -591,7 +592,6 @@ Class ThreadEntry { elseif ($staff_id = Staff::getIdByEmail($mailinfo['email'])) { $vars['staffId'] = $staff_id; $poster = Staff::lookup($staff_id); - $errors = array(); $vars['note'] = $body; return $ticket->postNote($vars, $errors, $poster); } @@ -599,6 +599,15 @@ Class ThreadEntry { // Don't process the email -- it came FROM this system return true; } + // Support the mail parsing system declaring a thread-type + elseif (isset($mailinfo['thread-type'])) { + switch ($mailinfo['thread-type']) { + case 'N': + $vars['note'] = $body; + $poster = $mailinfo['email']; + return $ticket->postNote($vars, $errors, $poster); + } + } // TODO: Consider security constraints else { $vars['message'] = sprintf("Received From: %s\n\n%s",