email to staff and client

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
wedlock
Posts: 19
Joined: Sun Feb 08, 2009 10:43 am

email to staff and client

Post by wedlock »

hello, my Heskis version 2.0
it is possible that when a member of the staff answers to the ticket it arrives email the customer also to all the members of the staff?

thanks
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can try changing this code in admin_reply_ticket.php

Code: Select all

/* Send the e-mail */
$headers="From: $hesk_settings[noreply_mail]\n";
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
$headers.="Return-Path: $hesk_settings[webmaster_mail]\n";
@mail($orig_email,$hesklang['new_reply_staff'],$message,$headers);
to

Code: Select all

/* Send the e-mail */
$headers="From: $hesk_settings[noreply_mail]\n";
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
$headers.="Return-Path: $hesk_settings[webmaster_mail]\n";

$admins=array();
$sql = "SELECT `email`,`isadmin`,`categories` FROM `".$hesk_settings['db_pfix']."users` WHERE `notify`='1'";
$result = hesk_dbQuery($sql);
while ($myuser=hesk_dbFetchAssoc($result))
{
    /* Is this an administrator? */
    if ($myuser['isadmin']) {$admins[]=$myuser['email']; continue;}
    /* Not admin, is he allowed this category? */
    $cat=substr($myuser['categories'], 0, -1);
    $myuser['categories']=explode(',',$cat);
    if (in_array($category,$myuser['categories']))
    {
        $admins[]=$myuser['email']; continue;
    }
}
if (count($admins)>0)
{
	$admin_mails = implode(',',$admins);
	$headers.="Bcc: $admin_mails\n";
}
@mail($orig_email,$hesklang['new_reply_staff'],$message,$headers);
haven't tested it...
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
Post Reply