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 »

Script URL: 2.2

Hello,
I would want that an email in copy to all the staff arrived when the staff it answers to the customer, is possible?

thank you,
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: email to staff and client

Post by Klemen »

No need for dupliate posts.

From the "READ THIS BEFORE POSTING" post: "Questions like Is this possible? How? will usually be ignored. Almost anything is possible with PHP/HTML/MySQL knowledge and we are not here to provide free programming services to individuals. Try it yourself, ask a friend that knows PHP, ... "

Please remember that in the future, but you can try posting this code in your admin/admin_reply_ticket.php

Code: Select all

$admins=array();
$sql = "SELECT `email`,`isadmin`,`categories` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `notify_new_unassigned`='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? */
	$myuser['categories']=explode(',',$myuser['categories']);
	if (in_array($tmpvar['category'],$myuser['categories']))
	{
		$admins[]=$myuser['email'];
		continue;
	}
}
if (count($admins)>0)
{
	/* Format e-mail message for staff */
	$msg = hesk_getEmailMessage('new_ticket_staff',$ticket,1);

	/* Send e-mail to staff */
	$email=implode(',',$admins);
	mail($email,$hesklang['new_reply_staff'],$msg,$headers);
}
Paste it just BELOW

Code: Select all

@mail($ticket['email'],$hesklang['new_reply_staff'],$msg,$headers);
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
wedlock
Posts: 19
Joined: Sun Feb 08, 2009 10:43 am

Re: email to staff and client

Post by wedlock »

thank you klemen.
wedlock
Posts: 19
Joined: Sun Feb 08, 2009 10:43 am

Re: email to staff and client

Post by wedlock »

not work klemen... :cry:
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: email to staff and client

Post by Klemen »

How about if you delete

Code: Select all

WHERE `notify_new_unassigned`='1'
from the SQL code?
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