Page 1 of 1
auto add extra email receiver
Posted: Thu Dec 01, 2011 8:20 pm
by lupolo
Hello,
Does somebody know how to add a extra mail adres to a ticket. So if
mr1@domain.com submits a ticket a specific
mr2@domain.com will be attach to this mail?
For example: there is omeone responible for the submitted tickets and always be informed about the tickets from his collegs/peronal?
I think hacking this in with a email domain check ..
Re: auto add extra email receiver
Posted: Fri Dec 02, 2011 4:03 pm
by Klemen
In submit_ticket.php try something like
Code: Select all
if (strpos($tmpvar['email'],'@domain.com') !== 'false') {$tmpvar['email'].=',me2@domain.com';}
Re: auto add extra email receiver
Posted: Fri Dec 02, 2011 4:10 pm
by lupolo
Will try this mod, how to do this with multiple domains?
Will reply wenn tested.
Re: auto add extra email receiver
Posted: Sat Dec 03, 2011 10:03 am
by lupolo
Have tried to add the line:
Code: Select all
if (strpos($tmpvar['email'],'@domain.com') !== 'false') {$tmpvar['email'].=',software@domain.com;}
/* All good now, continue with ticket creation */
$trackingURL = $hesk_settings['hesk_url'].'/ticket.php?track='.$trackingID;
$history = '';
$tmpvar['owner'] = 0;
But no succes, the idea is also to add more lines like this, but than i could put a few lines undernead eatother ?
Re: auto add extra email receiver
Posted: Sat Dec 03, 2011 4:33 pm
by Klemen
There was a typo in the code, this should work:
Code: Select all
if (strpos($tmpvar['email'],'@domain.com') !== false) {$tmpvar['email'].=',software@domain.com';}
lupolo wrote:the idea is also to add more lines like this, but than i could put a few lines undernead eatother ?
Try it, should work.
Re: auto add extra email receiver
Posted: Sun Dec 04, 2011 1:36 pm
by lupolo
It worked out for me ...
would be a nice future
thanks
Re: auto add extra email receiver
Posted: Tue May 15, 2012 12:20 pm
by lupolo
This MOD/HACK works great for me and the customers! The only think what happens now it the one who i want to inform creates his own ticket .. he will received it twice.
Is there a little extra MOD who check's on double email, and strip one if double? So the ticket creator only received one email, with above MOD/HACK?
Re: auto add extra email receiver
Posted: Tue May 15, 2012 1:21 pm
by Klemen
You can use the same logic and compare to the full email address
Code: Select all
if (strpos($tmpvar['email'],'@domain.com') !== false && strpos($tmpvar['email'],'software@domain.com') === false ) {$tmpvar['email'].=',software@domain.com';}
You should read a PHP tutorial or search Google to get some basic ideas on how PHP comparison works

Re: auto add extra email receiver
Posted: Wed May 16, 2012 7:27 am
by lupolo
Must do indeed
For the one who is interrested:
Code: Select all
if (strpos($tmpvar['email'],'@domain.nl') !== false && strpos($tmpvar['email'],'extra_receiver@domain.nl') === false ) {$tmpvar['email'].=',extra_receiver@domain.nl';}
Thanks ! Worked well!