Page 1 of 1
email to staff and client
Posted: Sun Feb 08, 2009 10:48 am
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
Posted: Sun Feb 08, 2009 1:42 pm
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...