Ticket ID in Email Subject

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
chrisn0123
Posts: 5
Joined: Tue Feb 15, 2011 11:28 am

Ticket ID in Email Subject

Post by chrisn0123 »

Hi all,

Just wondering if anybody knows how I can get the ticket id into the email subject of every
email that is sent out from hesk?

There's the *.txt files in languages/en/emails directory, such as "new_ticket.txt" etc, but they
are only the body of the email.

I would love to have "New ticket submitted - Ticket ID: ABCDEFGHI"

Spent ages looking, but cannot find out how! Searched and searched on here :)

I'm using Hesk 2.2 (latest as of Feb 2011)

Thanks all!
Chris
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: Ticket ID in Email Subject

Post by Raven »

I also had this in my old installation of Hesk but since upgrading to v2.2 can't seem to find the post explaining how it was done anymore....

Anyone know how to do this in v2.2?

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

Re: Ticket ID in Email Subject

Post by Klemen »

Here are a few posts about editing the e-mail subject:

viewtopic.php?f=13&t=1103&p=4608

viewtopic.php?t=1701&highlight=email+subject

viewtopic.php?t=2801&highlight=email+subject

Similar code can be found in all files that send out mail:
submit_ticket.php
reply_ticket.php
admin_reply_ticket.php
admin_submit_ticket.php
assign_owner.php
move_category.php
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
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: Ticket ID in Email Subject

Post by Raven »

Fantastic, thanks for that Klemen ;)
chrisn0123
Posts: 5
Joined: Tue Feb 15, 2011 11:28 am

Re: Ticket ID in Email Subject

Post by chrisn0123 »

Brilliant!!! Thanks for all of your help on this! :)

With your help I managed to change under admin_submit_ticket.php and submit_ticket.php
under "format e-mail message for customer"

@mail($tmpvar['email'],$hesklang['ticket_received'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);

Emails come in like this now:
Ticket received - TrackingID: A4ZVQYBMJG

PERFECT! :D

The above can be changed for submit_ticket.php and all the reply ticket php files too. REMEMBER you
only change AFTER @mail($tmpvar['email'],$hesklang['ticket_received' <<<<CHANGE HERE>>>>>

Thanks all!

Take care,
Chris
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: Ticket ID in Email Subject

Post by Raven »

I made the following modifications and it is working perfectly :)

submit_ticket.php
Search for

Code: Select all

@mail($tmpvar['email'],$hesklang['ticket_received']
Replace entire line with

Code: Select all

@mail($tmpvar['email'],$hesklang['ticket_received'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);
------------------------------------------------------------------------------------------------------------------------------------

reply_ticket.php
Search for

Code: Select all

@mail($email,$hesklang['new_reply_ticket']
Replace entire line with

Code: Select all

@mail($email,$hesklang['new_reply_ticket'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);
------------------------------------------------------------------------------------------------------------------------------------

admin/admin_reply_ticket.php
Search for

Code: Select all

@mail($ticket['email'],$hesklang['new_reply_staff']
Replace entire line with

Code: Select all

@mail($ticket['email'],$hesklang['new_reply_staff'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);
------------------------------------------------------------------------------------------------------------------------------------

admin/admin_submit_ticket.php
Search for

Code: Select all

@mail($tmpvar['email'],$hesklang['ticket_received']
Replace entire line with

Code: Select all

@mail($tmpvar['email'],$hesklang['ticket_received'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);
------------------------------------------------------------------------------------------------------------------------------------

admin/assign_owner.php
Search for

Code: Select all

@mail($email,$hesklang['ticket_assigned_to_you']
Replace entire line with

Code: Select all

@mail($email,$hesklang['ticket_assigned_to_you'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);
------------------------------------------------------------------------------------------------------------------------------------

admin/move_category.php
Search for

Code: Select all

@mail($email,$hesklang['ntmc']
Replace entire line with

Code: Select all

@mail($email,$hesklang['ntmc'].' - TrackingID: '.$ticket['trackid'],$msg,$headers);
------------------------------------------------------------------------------------------------------------------------------------

The above was already posted but I thought it may help other users who need a step-by-step guide on how to do this ;)
chrisn0123
Posts: 5
Joined: Tue Feb 15, 2011 11:28 am

Re: Ticket ID in Email Subject

Post by chrisn0123 »

Thanks Raven! :D
hollandsedrop
Posts: 90
Joined: Tue Dec 30, 2008 11:29 am

Re: Ticket ID in Email Subject

Post by hollandsedrop »

Hi friends,

When received new ticket coming e-mail ticket subject on email subject area

example: DEанонM
should be : DEĞİŞİM

I have charset problem this area. How can i fix it?

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

Re: Ticket ID in Email Subject

Post by Klemen »

Are you using this modifications or the original files? If you use original ones please start a new topic with details on what language and encoding you usel
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
hollandsedrop
Posts: 90
Joined: Tue Dec 30, 2008 11:29 am

Re: Ticket ID in Email Subject

Post by hollandsedrop »

Original files (very small modification). My language is turkish and encoding charset=windows-1254

Thanks...
Post Reply