how can I receive the ticket SUBJECT line as the email subje

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

how can I receive the ticket SUBJECT line as the email subje

Post by ricksaul »

Hi, can you tell me what I can change to receive the ticket SUBJECT line as the email subject . And also how I can add fields from the ticket into the subject of the email that is sent to the helpdesk staff..

thanks, Rick Saul
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

In submit_ticket.php find

Code: Select all

@mail($email,$hesklang['new_ticket_submitted'],$message,$headers); 
and change it to

Code: Select all

@mail($email,$subject,$message,$headers); 
or even better to this so you know it's from Hesk:

Code: Select all

@mail($email,'[HESK] '.$subject,$message,$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
ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

change subject line

Post by ricksaul »

Klemen changing the subject line to reflect the real job subject has worked brilliantly.. Can the same be done with the category? When I try to add category to the helpdesk email all I get is the category number ?

thanks, Rick Saul
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You'd have to get cat name that matches the ID number from the database. I might be able to help after Friday, remind me.
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
ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

Can the category be added to the subject line

Post by ricksaul »

Hi Klemen, you asked me to remind you Friday about adding the category to the subject line.

Also would you have any links to help with mysql admin. My son is trying to install on a mac notebook and he also has no background in mysql so doesnt know how to find out or connect hesk to the mysql database. He has installed hesk, php, etc but is stuck on where to go from there

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

Post by Klemen »

Paste this code in the line above where you first use $category:

Code: Select all

$sql = "SELECT `name` FROM `hesk_categories` WHERE `id` = $category LIMIT 1";
$result = hesk_dbQuery($sql);
$res = hesk_dbFetchRow($result);
$category = $res[0];
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
ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

Can the category be added to the subject line

Post by ricksaul »

Klemen thanks for this. I have tried adding to submit_ticket.php but am not sure exactly where to put it ..

attempt 1 did not work
attempt 2 error the submit new ticket page

Can you advise. thanks Rick
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can put it just above the first

Code: Select all

$message=str_replace('%%NAME%%',$name,$message); 
(line 153).
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
ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

Can the category be added to the subject line

Post by ricksaul »

thanks Klemen .. this has worked really well.

regards Rick
tb@djh.dk
Posts: 12
Joined: Wed Aug 22, 2007 8:54 am

Post by tb@djh.dk »

Klemen Stirn wrote:In submit_ticket.php find

Code: Select all

@mail($email,$hesklang['new_ticket_submitted'],$message,$headers); 
and change it to

Code: Select all

@mail($email,$subject,$message,$headers); 
or even better to this so you know it's from Hesk:

Code: Select all

@mail($email,'[HESK] '.$subject,$message,$headers); 
What if I want both?
As always, thanks in advance :-)
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Did you try the last code? I think if you did it would answer your question :wink:
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
tb@djh.dk
Posts: 12
Joined: Wed Aug 22, 2007 8:54 am

Oooops

Post by tb@djh.dk »

I made this one work though

@mail($to = "xxx@domainxx.dk",$hesklang['new_ticket_submitted '].$subject,$message,$headers);

thank you
As always, thanks in advance :-)
bcassaro
Posts: 3
Joined: Wed Dec 19, 2007 9:11 pm

Customize Staff E-mail on new ticket submission

Post by bcassaro »

I am interested in making changes to the new_ticket_staff.txt to provide a quick summarization of the ticket with-in the e-mail.

Mainly, I would like to add the "body" of the message (what is the problem) along with the person's name, e-mail address, and custom field 1 and 2.

If possible, please assist.

Thank you,
Bryan Cassaro
Post Reply