Page 1 of 1

Can message be included on mal to staff?

Posted: Wed Feb 22, 2006 12:13 am
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

Posted: Thu Mar 16, 2006 12:03 pm
by lambertlambert2003
im trying to do the same, any help??

Posted: Wed Dec 19, 2007 9:40 pm
by bcassaro
Did you ever fiqure this out? That is exactly what I tried.

Inlcude message body in e-mail to staff

Posted: Fri Jan 11, 2008 4:49 pm
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%%

can we please have a reply to this one

Posted: Wed Apr 09, 2008 10:00 pm
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

Posted: Thu Apr 10, 2008 11:48 am
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.

message in email

Posted: Thu Apr 10, 2008 9:41 pm
by chiphh
Ok thanks for the response I can wait for May - keep up the excellent work.

Cheers

Re: Can message be included on mal to staff?

Posted: Thu May 21, 2009 11:25 pm
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

Thanks!

Posted: Mon Jun 01, 2009 11:42 pm
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

Re: Thanks!

Posted: Fri Jul 03, 2009 2:41 pm
by ictconsulting
Yes, Dany, good man yourself ;-)

Posted: Sun Sep 06, 2009 12:55 pm
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

Posted: Sun Sep 06, 2009 4:57 pm
by Klemen
Where did ou find Hesk version 3.0.4??

%%MESSAGE%% is included and works by default in the latest Hesk (2.1).

Posted: Sun Sep 06, 2009 5:05 pm
by allawrence
My apologies... should have said 2.1

Working on 2 different programs...

Posted: Sat Oct 31, 2009 3:16 pm
by ugogo.info
The %%MESSAGE%% works fine for me in 2.1, thanks !

adding reply while staff reply.

Posted: Fri Feb 19, 2010 8:19 am
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