2.4.1 adding email to user when closing ticket (Solved)

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
djm79
Posts: 2
Joined: Fri Dec 07, 2012 10:49 pm

2.4.1 adding email to user when closing ticket (Solved)

Post by djm79 »

I'm testing out Hesk for a replacement for a aging Track-It system we have, the only big snag I have with it is I want to use a separate email template for when our help desk closes the ticket that will contain a link to our survey server (boss wants to track user satisfaction). Right now its using the new_reply_by_staff. Could someone walk me through the changes that would need to be made to add another email template?

This software looks great thanks for all your effort.
Last edited by djm79 on Mon Dec 10, 2012 5:28 pm, edited 1 time in total.
djm79
Posts: 2
Joined: Fri Dec 07, 2012 10:49 pm

Re: 2.4.1 adding email to user when closing ticket

Post by djm79 »

After some digging I found some other posts that I used their code and my own reply.txt files to have Hesk now send different replies when staff respond to an email and when they close a ticket. :wink:
arbolpalmerita
Posts: 4
Joined: Wed Dec 19, 2012 11:48 pm

Re: 2.4.1 adding email to user when closing ticket (Solved)

Post by arbolpalmerita »

3 steps

1.- create admin_reply_close_ticket.txt (language\xx\email)

2.- modify admin_reply_ticket.php (\admin\)
FIND the line

Code: Select all

/* --> Prepare reply message */
$ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1, 0);
$ticket['message'] = hesk_msgToPlain($message, 1);
INSERT after the up line

Code: Select all

/* Format e-mail message */
if ($new_status == 3)
{
close_ticket('admin_reply_close_ticket');
}
/* Notify the customer */
else
{
hesk_notifyCustomer('new_reply_by_staff');
}
3.- modify email_funtions.inc.php (inc\)
INSERT

Code: Select all

function close_ticket($email_template = 'admin_reply_close_ticket')
{
	global $hesk_settings, $hesklang, $ticket;

	// Demo mode
	if ( defined('HESK_DEMO') )
	{
		return true;
	}

	// Format email subject and message
	$subject = hesk_getEmailSubject($email_template,$ticket);
	$message = hesk_getEmailMessage($email_template,$ticket);

    // If we allow email piping/pop 3 fetching and stripping quoted replies add an "reply above this line" tag
    if ( ($hesk_settings['email_piping'] || $hesk_settings['pop3']) && $hesk_settings['strip_quoted'])
    {
    	$message = $hesklang['EMAIL_HR'] . "\n\n" . $message;
    }

	// Send e-mail
	hesk_mail($ticket['email'], $subject, $message);

    return true;
} 
after of // END hesk_notifyCustomer()

FIND function hesk_validEmails()
INSERT

Code: Select all

'admin_reply_close_ticket' => $hesklang['admin_reply_close_ticket'],


Work!!!
true history.
donfrankrice
Posts: 7
Joined: Fri Jul 26, 2013 3:00 pm

Re: 2.4.1 adding email to user when closing ticket (Solved)

Post by donfrankrice »

I am trying to follow your instructions and when I close a ticket and click on "Save", I get "invalid email file". I am new to HESK, so I am wondering if perhaps there are changes between 2.4.1 and 2.5.0 that might contribute to this problem?
Post Reply