auto add extra email receiver

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

auto add extra email receiver

Post 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 ..
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: auto add extra email receiver

Post by Klemen »

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 Image

Image 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
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: auto add extra email receiver

Post by lupolo »

Will try this mod, how to do this with multiple domains?

Will reply wenn tested.
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: auto add extra email receiver

Post 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 ?
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: auto add extra email receiver

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: auto add extra email receiver

Post by lupolo »

It worked out for me ...

would be a nice future :)

thanks
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: auto add extra email receiver

Post 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?
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: auto add extra email receiver

Post 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 :wink:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: auto add extra email receiver

Post 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!
Post Reply