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 ..
auto add extra email receiver
Moderator: mkoch227
Re: auto add extra email receiver
In submit_ticket.php try something like
Code: Select all
if (strpos($tmpvar['email'],'@domain.com') !== 'false') {$tmpvar['email'].=',me2@domain.com';}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: auto add extra email receiver
Will try this mod, how to do this with multiple domains?
Will reply wenn tested.
Will reply wenn tested.
Re: auto add extra email receiver
Have tried to add the line:
But no succes, the idea is also to add more lines like this, but than i could put a few lines undernead eatother ?
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;
Re: auto add extra email receiver
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';}
Try it, should work.lupolo wrote:the idea is also to add more lines like this, but than i could put a few lines undernead eatother ?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: auto add extra email receiver
It worked out for me ...
would be a nice future
thanks
would be a nice future

thanks
Re: auto add extra email receiver
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?
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
You can use the same logic and compare to the full email address
You should read a PHP tutorial or search Google to get some basic ideas on how PHP comparison works 
Code: Select all
if (strpos($tmpvar['email'],'@domain.com') !== false && strpos($tmpvar['email'],'software@domain.com') === false ) {$tmpvar['email'].=',software@domain.com';}

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: auto add extra email receiver
Must do indeed 
For the one who is interrested:
Thanks ! Worked well!

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';}