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

Merge pull request #362 from protich/issue/360

Fix duplicate emails bug
parents cfa0f5d4 52e58ae5
No related branches found
No related tags found
No related merge requests found
......@@ -1451,7 +1451,7 @@ class Ticket {
$sentlist=array(); //I know it sucks...but..it works.
foreach( $recipients as $k=>$staff){
if(!$staff || !$staff->getEmail() || !$staff->isAvailable() && in_array($staff->getEmail(),$sentlist)) continue;
if(!$staff || !$staff->getEmail() || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue;
$alert = str_replace('%{recipient}', $staff->getFirstName(), $msg['body']);
$email->send($staff->getEmail(), $msg['subj'], $alert);
$sentlist[] = $staff->getEmail();
......
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