Can message be included on mal to staff?

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
bart_arg
Posts: 5
Joined: Fri Feb 17, 2006 11:04 pm

Can message be included on mal to staff?

Post by bart_arg »

I have tried to include %%MESSAGE%% in new_ticket_staff.txt making some changes in submit_ticket.php but it does not work.
Can anybody help?
I would like to receive the customer message with the e-mail

Many thanks
lambertlambert2003
Posts: 2
Joined: Thu Mar 16, 2006 12:02 pm

Post by lambertlambert2003 »

im trying to do the same, any help??
bcassaro
Posts: 3
Joined: Wed Dec 19, 2007 9:11 pm

Post by bcassaro »

Did you ever fiqure this out? That is exactly what I tried.
bcassaro
Posts: 3
Joined: Wed Dec 19, 2007 9:11 pm

Inlcude message body in e-mail to staff

Post by bcassaro »

Kleman,

I don't know if you can help me this this. But I am trying to figure out how to include the message body in the e-mail to staff along with the custom fields. This is what I have so far:



A new support ticket has been submitted by: %%NAME%%

Subject: %%SUBJECT%%
Ticket ID: %%TRACK_ID%%

Contact E-Mail: %%HESK_EMAIL%%
Phone Number: %%HESK_custom1%%
Computer Name: %%HESK_custom2%%
Your Location: %%HESK_custom1%%
Desk Phone Extension: %%HESK_custom2%%

Problem Description: %%MESSAGE%%

You can manage this ticket here:
%%TRACK_URL%%
chiphh
Posts: 7
Joined: Fri Apr 04, 2008 1:09 pm

can we please have a reply to this one

Post by chiphh »

Hi Klemen,
I haved been digging around and found that my request to add the message content to the body of the email has not been answered.

I would appreciate it if you could reply as I too have tried unsucessfully to add %%MESSAGE%% in the body of the mail.

If you are worried about a security conflict don't worry as many help desks provide these feature and don't seem to have any problem with it, however it is very helpful for customers and support staff when there is more than one ticket open at the same time from the same user,

Thanks a bunch
HAPPY USER OF HESK
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It's on my "to do" list for the next version (in May probably?), but it's too much editing and things to consider to be able to help you out here. So I'm afraid you will have to wait for the next version to get this functionality.
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
chiphh
Posts: 7
Joined: Fri Apr 04, 2008 1:09 pm

message in email

Post by chiphh »

Ok thanks for the response I can wait for May - keep up the excellent work.

Cheers
HAPPY USER OF HESK
danyanderson
Posts: 3
Joined: Sat Mar 21, 2009 6:16 pm

Re: Can message be included on mal to staff?

Post by danyanderson »

bart_arg wrote:I have tried to include %%MESSAGE%% in new_ticket_staff.txt making some changes in submit_ticket.php but it does not work.
Can anybody help?
I would like to receive the customer message with the e-mail

Many thanks
Hi bart_arg,

I dont know if it is that you need, but anyway try:

submit_ticket.php

Put

Code: Select all

$messagetomail = $message;
between

Code: Select all

$message=hesk_makeURL($message);
$message=nl2br($message);
and after code below

Code: Select all

if (count($admins)>0)
{
$trackingURL_admin=$hesk_settings['hesk_url'].'/admin/admin_ticket.php?id='.$trackingID;

$message=file_get_contents(HESK_PATH.'emails/'.$hesk_settings['language'].'/new_ticket_staff.txt');
$message=str_replace('%%NAME%%',$name,$message);
$message=str_replace('%%SUBJECT%%',$subject,$message);
$message=str_replace('%%TRACK_ID%%',$trackingID,$message);
$message=str_replace('%%TRACK_URL%%',$trackingURL_admin,$message);
$message=str_replace('%%SITE_TITLE%%',$hesk_settings['site_title'] ,$message);
$message=str_replace('%%SITE_URL%%',$hesk_settings['site_url'] ,$message);
put

Code: Select all

$message=str_replace('%%MESSAGE%%',$messagetomail,$message);
In the file /emails/new_ticket_staff.txt after code below

Code: Select all

Ticket subject: %%SUBJECT%%
Tracking ID: %%TRACK_ID%%
put

Code: Select all

Message:
%%MESSAGE%%
I've tested here and it has worked fine.

Regards,

Dany Anderson
resten
Posts: 7
Joined: Sat Jan 24, 2009 8:01 pm

Thanks!

Post by resten »

Hi Danny,

I just wanted to say thank you for that solution. I have now implemented it and it works perfectly.

Kind regards
Dan
ictconsulting
Posts: 21
Joined: Sun Feb 01, 2009 2:21 pm

Re: Thanks!

Post by ictconsulting »

Yes, Dany, good man yourself ;-)
allawrence
Posts: 56
Joined: Wed Sep 06, 2006 11:44 pm

Post by allawrence »

Can't match up some of the lines of code mentioned to the current version of Hesk (3.0.4); hopefully it is not my eyes playing tricks.. if it would not be too much trouble can you update your code?



Thanks

Al
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Where did ou find Hesk version 3.0.4??

%%MESSAGE%% is included and works by default in the latest Hesk (2.1).
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
allawrence
Posts: 56
Joined: Wed Sep 06, 2006 11:44 pm

Post by allawrence »

My apologies... should have said 2.1

Working on 2 different programs...
ugogo.info
Posts: 26
Joined: Sat Oct 31, 2009 2:14 pm

Post by ugogo.info »

The %%MESSAGE%% works fine for me in 2.1, thanks !
anilthomas
Posts: 1
Joined: Fri Feb 19, 2010 8:14 am

adding reply while staff reply.

Post by anilthomas »

I added same as instructed but it didnt work. Let me know how to correct it please.

the file submit_ticket.php the lines from 280



if (count($admins)>0)
{
$trackingURL_admin=$hesk_settings['hesk_url'].'/admin/admin_ticket.php?track='.$trackingID;

$msg = hesk_getEmailMessage('new_ticket_staff');
$msg = str_replace('%%NAME%%',hesk_msgToPlain($name,1),$msg);
$msg = str_replace('%%SUBJECT%%',hesk_msgToPlain($subject,1),$msg);
$msg = str_replace('%%TRACK_ID%%',$trackingID,$msg);
$msg = str_replace('%%TRACK_URL%%',$trackingURL_admin,$msg);
$msg = str_replace('%%SITE_TITLE%%',$hesk_settings['site_title'],$msg);
$msg = str_replace('%%SITE_URL%%',$hesk_settings['site_url'],$msg);
$msg = str_replace('%%MESSAGE%%',hesk_msgToPlain($message,1),$msg);
$msg = str_replace('%%MESSAGE%%',$messagetomail,$message,$msg);

/* Send e-mail to staff */
$email=implode(',',$admins);
$headers = "From: $hesk_settings[noreply_mail]\n";
$headers.= "Reply-to: $hesk_settings[noreply_mail]\n";
$headers.= "Return-Path: $hesk_settings[webmaster_mail]\n";
$headers.= "Content-type: text/plain; charset=".$hesklang['ENCODING'];
@mail($email,$hesklang['new_ticket_submitted'],$msg,$headers);

thanks for the help
Anil
Post Reply