Email Notifications

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
davwat
Posts: 2
Joined: Thu May 07, 2009 4:43 pm

Email Notifications

Post by davwat »

Script URL:
Version of script:2.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

In our case we have more than one user making replies to the same ticket.

When a user has replied to a ticket an email notification is sent to the submitter. Is it possible to modify the code a little so an email notification is also sent to other users so they are aware that a reply has been made by another user.

Have good Day!
Dave Watkins
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Haven't tested it, but try opening admin_reply_ticket.php in Notepad and just above this line

Code: Select all

/* Send the e-mail */
paste this

Code: Select all

/* Need to notify other admins? */
$admins=array();
$sql = "SELECT `email`,`isadmin`,`categories` FROM `".$hesk_settings['db_pfix']."users` WHERE `notify`='1' AND `id` != $_SESSION[id]";
$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)
{
	$orig_email .= ',' . implode(',',$admins);
}
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
davwat
Posts: 2
Joined: Thu May 07, 2009 4:43 pm

Post by davwat »

Klemen

Thanks a lot for giving me the code. It works fine as long as the other users receiving the email have full access to all the admin features but not with those users that have limited access.

As the message that gets sent to the users is the message that is intended for the submitter, the users will have to be careful and remember not to reply to any of the tickets by going to the support ticket direct from the link in the email as they will need to log in to reply otherwise they will be answering in the submitters name.


Have Good Day!
Dave Watkins
Post Reply