Skip to content
Snippets Groups Projects
Commit a303382e authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #529 from greezybacon/feature/to-cc-filter-match


Add addressee to filtering system

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 18351aff 2a25de52
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ class Filter {
'Email Meta-Data' => array(
'reply-to' => 'Reply-To Email',
'reply-to-name' => 'Reply-To Name',
'addressee' => 'Addressee (To and Cc)',
),
);
......@@ -693,6 +694,13 @@ class TicketFilter {
if (in_array($k, $interest))
$this->vars[$k] = trim($v);
}
if (isset($vars['recipients'])) {
foreach ($vars['recipients'] as $r) {
$this->vars['addressee'][] = $r['name'];
$this->vars['addressee'][] = $r['email'];
}
$this->vars['addressee'] = implode(' ', $this->vars['addressee']);
}
//Init filters.
$this->build();
......
......@@ -306,7 +306,6 @@ class MailFetcher {
//BCCed?
if(!$header['emailId']) {
unset($header['recipients']); //Nuke the recipients - we were bcced
if ($headerinfo->bcc) {
foreach($headerinfo->bcc as $addr)
if (($header['emailId'] = Email::getIdByEmail(strtolower($addr->mailbox).'@'.$addr->host)))
......
......@@ -466,7 +466,6 @@ class EmailDataParser {
//maybe we got BCC'ed??
if(!$data['emailId']) {
unset($data['recipients']);
$emailId = 0;
if($bcc = $parser->getBccAddressList()) {
foreach ($bcc as $addr)
......
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