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

Fixup message-id tracking for piped emails

parent ed3941bb
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,8 @@ class TicketApiController extends ApiController {
if(!strcasecmp($format, 'email'))
$supported = array_merge($supported, array('header', 'mid',
'emailId', 'ticketId', 'reply-to', 'reply-to-name'));
'emailId', 'ticketId', 'reply-to', 'reply-to-name',
'in-reply-to', 'references'));
return $supported;
}
......@@ -115,7 +116,7 @@ class TicketApiController extends ApiController {
if (($thread = ThreadEntry::lookupByEmailHeaders($data))
&& $thread->postEmail($data)) {
return true;
return $thread->getTicket();
}
return $this->createTicket($data);
}
......
......@@ -341,6 +341,9 @@ class EmailDataParser {
$data['priorityId'] = $parser->getPriority();
$data['emailId'] = $emailId;
$data['in-reply-to'] = $parser->struct->headers['in-reply-to'];
$data['references'] = $parser->struct->headers['references'];
if ($replyto = $parser->getReplyTo()) {
$replyto = $replyto[0];
$data['reply-to'] = $replyto->mailbox.'@'.$replyto->host;
......
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