Closes #106: Support HTML-formatted emails

This commit is contained in:
Mike Koch 2015-02-01 00:58:12 -05:00
parent 2a5421e4d5
commit c532369fd4
20 changed files with 342 additions and 116 deletions

View File

@ -37,6 +37,7 @@ define('HESK_PATH','../');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php'); require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions(); hesk_load_database_functions();
@ -354,6 +355,7 @@ $info = array(
'dt' => hesk_date($ticket['dt'], true), 'dt' => hesk_date($ticket['dt'], true),
'lastchange' => hesk_date($ticket['lastchange'], true), 'lastchange' => hesk_date($ticket['lastchange'], true),
'id' => $ticket['id'], 'id' => $ticket['id'],
'language' => $ticket['language']
); );
// 2. Add custom fields to the array // 2. Add custom fields to the array

View File

@ -37,6 +37,7 @@ define('HESK_PATH','../');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php'); require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions(); hesk_load_database_functions();
@ -446,10 +447,11 @@ if (isset($_POST['notemsg']) && hesk_token_check('POST'))
/* Format email subject and message for staff */ /* Format email subject and message for staff */
$subject = hesk_getEmailSubject('new_note',$ticket); $subject = hesk_getEmailSubject('new_note',$ticket);
$message = hesk_getEmailMessage('new_note',$ticket,1); $message = hesk_getEmailMessage('new_note',$ticket,1);
$htmlMessage = hesk_getHtmlMessage('new_note',$ticket,1);
/* Send email to staff */ /* Send email to staff */
while ($user = hesk_dbFetchAssoc($users)) { while ($user = hesk_dbFetchAssoc($users)) {
hesk_mail($user['email'], $subject, $message); hesk_mail($user['email'], $subject, $message, $htmlMessage);
} }
} }
} }

View File

@ -37,6 +37,7 @@ define('HESK_PATH','../');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php'); require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions(); hesk_load_database_functions();
@ -353,9 +354,10 @@ function mail_send()
/* Format email subject and message for recipient */ /* Format email subject and message for recipient */
$subject = hesk_getEmailSubject('new_pm',$pm,0); $subject = hesk_getEmailSubject('new_pm',$pm,0);
$message = hesk_getEmailMessage('new_pm',$pm,1,0); $message = hesk_getEmailMessage('new_pm',$pm,1,0);
$htmlMessage = hesk_getHtmlMessage('new_pm',$pm,1,0);
/* Send e-mail */ /* Send e-mail */
hesk_mail($pm_recipient['email'], $subject, $message); hesk_mail($pm_recipient['email'], $subject, $message, $htmlMessage);
} }
unset($_SESSION['mail']); unset($_SESSION['mail']);

View File

@ -37,6 +37,7 @@ define('HESK_PATH','../');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
// Is the password reset function enabled? // Is the password reset function enabled?
@ -176,15 +177,20 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
// Get the email message // Get the email message
$msg = hesk_getEmailMessage('reset_password',array(),1,0,1); $msg = hesk_getEmailMessage('reset_password',array(),1,0,1);
$htmlMsg = hesk_getHtmlMessage('reset_password',array(),1,0,1);
// Replace message special tags // Replace message special tags
$msg = str_replace('%%NAME%%', hesk_msgToPlain($row['name'],1,1), $msg); $msg = str_replace('%%NAME%%', hesk_msgToPlain($row['name'],1,1), $msg);
$msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $msg); $msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $msg);
$msg = str_replace('%%SITE_TITLE%%', $hesk_settings['site_title'], $msg); $msg = str_replace('%%SITE_TITLE%%', $hesk_settings['site_title'], $msg);
$msg = str_replace('%%PASSWORD_RESET%%', $hesk_settings['hesk_url'].'/'.$hesk_settings['admin_dir'].'/password.php?h='.$hash, $msg); $msg = str_replace('%%PASSWORD_RESET%%', $hesk_settings['hesk_url'].'/'.$hesk_settings['admin_dir'].'/password.php?h='.$hash, $msg);
$htmlMsg = str_replace('%%NAME%%', hesk_msgToPlain($row['name'],1,1), $htmlMsg);
$htmlMsg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $htmlMsg);
$htmlMsg = str_replace('%%SITE_TITLE%%', $hesk_settings['site_title'], $htmlMsg);
$htmlMsg = str_replace('%%PASSWORD_RESET%%', $hesk_settings['hesk_url'].'/'.$hesk_settings['admin_dir'].'/password.php?h='.$hash, $htmlMsg);
// Send email // Send email
hesk_mail($email, $hesklang['reset_password'], $msg); hesk_mail($email, $hesklang['reset_password'], $msg, $htmlMsg);
// Show success // Show success
hesk_process_messages($hesklang['pemls'],'NOREDIRECT','SUCCESS'); hesk_process_messages($hesklang['pemls'],'NOREDIRECT','SUCCESS');

View File

@ -35,8 +35,6 @@
/* Check if this is a valid include */ /* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');} if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require_once(HESK_PATH . 'modsForHesk_settings.inc.php');
/* Get includes for SMTP */ /* Get includes for SMTP */
if ($hesk_settings['smtp']) if ($hesk_settings['smtp'])
{ {
@ -59,6 +57,7 @@ function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $ac
// Format email subject and message // Format email subject and message
$subject = hesk_getEmailSubject($email_template, $ticket); $subject = hesk_getEmailSubject($email_template, $ticket);
$message = hesk_getEmailMessage($email_template, $ticket); $message = hesk_getEmailMessage($email_template, $ticket);
$htmlMessage = hesk_getHtmlMessage($email_template, $ticket);
$activationUrl = $hesk_settings['hesk_url'] . '/verifyemail.php?key=%%ACTIVATIONKEY%%'; $activationUrl = $hesk_settings['hesk_url'] . '/verifyemail.php?key=%%ACTIVATIONKEY%%';
$message = str_replace('%%VERIFYURL%%', $activationUrl, $message); $message = str_replace('%%VERIFYURL%%', $activationUrl, $message);
$message = str_replace('%%ACTIVATIONKEY%%', $activationKey, $message); $message = str_replace('%%ACTIVATIONKEY%%', $activationKey, $message);
@ -80,7 +79,7 @@ function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $ac
} }
} }
hesk_mail($ticket['email'], $subject, $message, $ccEmails, $bccEmails); hesk_mail($ticket['email'], $subject, $message, $htmlMessage, $ccEmails, $bccEmails);
} }
@ -105,6 +104,7 @@ function hesk_notifyCustomer($email_template = 'new_ticket')
// Format email subject and message // Format email subject and message
$subject = hesk_getEmailSubject($email_template,$ticket); $subject = hesk_getEmailSubject($email_template,$ticket);
$message = hesk_getEmailMessage($email_template,$ticket); $message = hesk_getEmailMessage($email_template,$ticket);
$htmlMessage = hesk_getHtmlMessage($email_template,$ticket);
// Add Cc / Bcc recipents if needed // Add Cc / Bcc recipents if needed
$ccEmails = array(); $ccEmails = array();
@ -122,7 +122,7 @@ function hesk_notifyCustomer($email_template = 'new_ticket')
} }
// Send e-mail // Send e-mail
hesk_mail($ticket['email'], $subject, $message, $ccEmails, $bccEmails); hesk_mail($ticket['email'], $subject, $message, $htmlMessage, $ccEmails, $bccEmails);
// Reset the language if it was changed // Reset the language if it was changed
if ($changedLanguage) if ($changedLanguage)
@ -168,9 +168,10 @@ function hesk_notifyAssignedStaff($autoassign_owner, $email_template, $type = 'n
/* Format email subject and message for staff */ /* Format email subject and message for staff */
$subject = hesk_getEmailSubject($email_template,$ticket); $subject = hesk_getEmailSubject($email_template,$ticket);
$message = hesk_getEmailMessage($email_template,$ticket,1); $message = hesk_getEmailMessage($email_template,$ticket,1);
$htmlMessage = hesk_getHtmlMessage($email_template,$ticket,1);
/* Send email to staff */ /* Send email to staff */
hesk_mail($autoassign_owner['email'], $subject, $message); hesk_mail($autoassign_owner['email'], $subject, $message, $htmlMessage);
/* Reset language to original one */ /* Reset language to original one */
hesk_resetLanguage(); hesk_resetLanguage();
@ -238,7 +239,7 @@ function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
if ($current_language != 'NONE') if ($current_language != 'NONE')
{ {
/* Send e-mail to staff */ /* Send e-mail to staff */
hesk_mail(implode(',',$recipients), $subject, $message ); hesk_mail(implode(',',$recipients), $subject, $message, $htmlMessage );
/* Reset list of email addresses */ /* Reset list of email addresses */
$recipients = array(); $recipients = array();
@ -250,6 +251,7 @@ function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
/* Format staff email subject and message for this language */ /* Format staff email subject and message for this language */
$subject = hesk_getEmailSubject($email_template,$ticket); $subject = hesk_getEmailSubject($email_template,$ticket);
$message = hesk_getEmailMessage($email_template,$ticket,$is_ticket); $message = hesk_getEmailMessage($email_template,$ticket,$is_ticket);
$htmlMessage = hesk_getHtmlMessage($email_template,$ticket,$is_ticket);
/* Add email to the recipients list */ /* Add email to the recipients list */
$recipients[] = $admin['email']; $recipients[] = $admin['email'];
@ -260,7 +262,7 @@ function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
} }
/* Send email messages to the remaining staff */ /* Send email messages to the remaining staff */
hesk_mail(implode(',',$recipients), $subject, $message ); hesk_mail(implode(',',$recipients), $subject, $message, $htmlMessage);
/* Reset language to original one */ /* Reset language to original one */
hesk_resetLanguage(); hesk_resetLanguage();
@ -322,7 +324,7 @@ function hesk_validEmails()
} // END hesk_validEmails() } // END hesk_validEmails()
function hesk_mail($to,$subject,$message,$cc=array(),$bcc=array()) function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
{ {
global $hesk_settings, $hesklang, $modsForHesk_settings; global $hesk_settings, $hesklang, $modsForHesk_settings;
@ -366,14 +368,27 @@ function hesk_mail($to,$subject,$message,$cc=array(),$bcc=array())
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,
array( $postfields = array(
'from' => $hesk_settings['from_header'], 'from' => $hesk_settings['from_header'],
'to' => $to, 'to' => $to,
'h:Reply-To'=> $hesk_settings['from_header'], 'h:Reply-To'=> $hesk_settings['from_header'],
'subject' => $subject, 'subject' => $subject,
'text' => $message 'text' => $message
)); );
if (count($cc) > 0)
{
$postfields['cc'] = implode(',',$cc);
}
if (count($bcc) > 0)
{
$postfields['bcc'] = implode(',',$bcc);
}
if ($modsForHesk_settings['html_emails'])
{
$postfields['html'] = $htmlMessage;
}
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$result = curl_exec($ch); $result = curl_exec($ch);
curl_close($ch); curl_close($ch);
@ -383,11 +398,31 @@ function hesk_mail($to,$subject,$message,$cc=array(),$bcc=array())
return (strlen($tmp)) ? $tmp : true; return (strlen($tmp)) ? $tmp : true;
} }
$boundary = sha1(uniqid());
//Prepare the message for HTML or non-html
if ($modsForHesk_settings['html_emails'])
{
$plaintextMessage = $message;
$message = "--".$boundary."\n";
$message .= "Content-Type: text/plain; charset=".$hesklang['ENCODING']."\n\n";
$message .= $plaintextMessage."\n\n";
$message .= "--".$boundary."\n";
$message .= "Content-Type: text/html; charset=".$hesklang['ENCODING']."\n\n";
$message .= $htmlMessage."\n\n";
$message .= "--".$boundary."--";
}
// Use PHP's mail function // Use PHP's mail function
elseif ( ! $hesk_settings['smtp']) if ( ! $hesk_settings['smtp'])
{ {
// Set additional headers // Set additional headers
$headers = "From: $hesk_settings[from_header]\n"; $headers = '';
if ($modsForHesk_settings['html_emails'])
{
$headers .= "MIME-Version: 1.0\n";
}
$headers .= "From: $hesk_settings[from_header]\n";
if (count($cc) > 0) if (count($cc) > 0)
{ {
$headers .= "Cc: ".implode(',',$cc); $headers .= "Cc: ".implode(',',$cc);
@ -399,7 +434,10 @@ function hesk_mail($to,$subject,$message,$cc=array(),$bcc=array())
$headers.= "Reply-To: $hesk_settings[from_header]\n"; $headers.= "Reply-To: $hesk_settings[from_header]\n";
$headers.= "Return-Path: $hesk_settings[webmaster_mail]\n"; $headers.= "Return-Path: $hesk_settings[webmaster_mail]\n";
$headers.= "Date: " . date(DATE_RFC2822) . "\n"; $headers.= "Date: " . date(DATE_RFC2822) . "\n";
$headers.= "Content-Type: text/plain; charset=" . $hesklang['ENCODING']; if ($modsForHesk_settings['html_emails'])
{
$headers.= "Content-Type: multipart/alternative;boundary=".$boundary;
}
// Send using PHP mail() function // Send using PHP mail() function
ob_start(); ob_start();
@ -427,16 +465,22 @@ function hesk_mail($to,$subject,$message,$cc=array(),$bcc=array())
// Send the e-mail using SMTP // Send the e-mail using SMTP
$to_arr = explode(',',$to); $to_arr = explode(',',$to);
$headersArray = array( $headersArray = array(
"From: $hesk_settings[from_header]", "From: $hesk_settings[from_header]",
"To: $to", "To: $to",
"Reply-To: $hesk_settings[from_header]", "Reply-To: $hesk_settings[from_header]",
"Return-Path: $hesk_settings[webmaster_mail]", "Return-Path: $hesk_settings[webmaster_mail]",
"Subject: " . $subject, "Subject: " . $subject,
"Date: " . date(DATE_RFC2822), "Date: " . date(DATE_RFC2822)
"Content-Type: text/plain; charset=" . $hesklang['ENCODING']
); );
if ($modsForHesk_settings['html_emails'])
{
array_push($headersArray,"MIME-Version: 1.0\n");
array_push($headersArray,"Content-Type: multipart/alternative;boundary=".$boundary."\n");
} else
{
array_push($headersArray,"Content-Type: text/plain; charset=" . $hesklang['ENCODING']);
}
if (count($cc) > 0) if (count($cc) > 0)
{ {
array_push($headersArray,"Cc: ".implode(',',$cc)); array_push($headersArray,"Cc: ".implode(',',$cc));
@ -548,6 +592,40 @@ function hesk_getEmailSubject($eml_file, $ticket='', $is_ticket=1, $strip=0)
} // hesk_getEmailSubject() } // hesk_getEmailSubject()
function hesk_getHtmlMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $just_message=0)
{
global $hesk_settings, $hesklang, $modsForHesk_settings;
// Demo mode
if ( defined('HESK_DEMO') || !$modsForHesk_settings['html_emails'])
{
return '';
}
// We won't do validation here, as hesk_getEmailMessage will be called which handles validation.
// Get email template
$original_eml_file = $eml_file;
$eml_file = 'language/'.$hesk_settings['languages'][$hesk_settings['language']]['folder'].'/emails/html/'.$original_eml_file.'.txt';
$plain_eml_file = 'language/'.$hesk_settings['languages'][$hesk_settings['language']]['folder'].'/emails/'.$original_eml_file.'.txt';
if (file_exists(HESK_PATH.$eml_file))
{
$msg = file_get_contents(HESK_PATH.$eml_file);
}
elseif (file_exists(HESK_PATH.$plain_eml_file))
{
$msg = file_get_contents(HESK_PATH.$plain_eml_file);
}
else
{
hesk_error($hesklang['emfm'].': '.$eml_file);
}
//Perform logic common between hesk_getEmailMessage and hesk_getHtmlMessage
$msg = hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message);
return $msg;
}
function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $just_message=0) function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $just_message=0)
{ {
@ -580,6 +658,15 @@ function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $ju
hesk_error($hesklang['emfm'].': '.$eml_file); hesk_error($hesklang['emfm'].': '.$eml_file);
} }
$msg = hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message);
return $msg;
} // END hesk_getEmailMessage
function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message)
{
global $hesk_settings, $hesklang;
/* Return just the message without any processing? */ /* Return just the message without any processing? */
if ($just_message) if ($just_message)
{ {
@ -707,5 +794,4 @@ function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $ju
} }
return $msg; return $msg;
}
} // END hesk_getEmailMessage

View File

@ -37,6 +37,7 @@ define('HESK_PATH','./');
// Get all the required files and functions // Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
// Are we in maintenance mode? // Are we in maintenance mode?
@ -1160,6 +1161,10 @@ function forgot_tid()
require(HESK_PATH . 'inc/email_functions.inc.php'); require(HESK_PATH . 'inc/email_functions.inc.php');
/* Get ticket(s) from database */
hesk_load_database_functions();
hesk_dbConnect();
$email = hesk_validateEmail( hesk_POST('email'), 'ERR' ,0) or hesk_process_messages($hesklang['enter_valid_email'],'ticket.php?remind=1'); $email = hesk_validateEmail( hesk_POST('email'), 'ERR' ,0) or hesk_process_messages($hesklang['enter_valid_email'],'ticket.php?remind=1');
if ( isset($_POST['open_only']) ) if ( isset($_POST['open_only']) )
@ -1175,10 +1180,6 @@ function forgot_tid()
$my_status[$myStatusRow['ID']] = $hesklang[$myStatusRow['TicketViewContentKey']]; $my_status[$myStatusRow['ID']] = $hesklang[$myStatusRow['TicketViewContentKey']];
} }
/* Get ticket(s) from database */
hesk_load_database_functions();
hesk_dbConnect();
// Get tickets from the database // Get tickets from the database
$res = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` FORCE KEY (`statuses`) WHERE ' . ($hesk_settings['open_only'] ? "`status` IN (SELECT `ID` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsClosed` = 0) AND " : '') . ' ' . hesk_dbFormatEmail($email) . ' ORDER BY `status` ASC, `lastchange` DESC '); $res = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` FORCE KEY (`statuses`) WHERE ' . ($hesk_settings['open_only'] ? "`status` IN (SELECT `ID` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsClosed` = 0) AND " : '') . ' ' . hesk_dbFormatEmail($email) . ' ORDER BY `status` ASC, `lastchange` DESC ');
@ -1213,16 +1214,17 @@ $hesk_settings[hesk_url]/ticket.php?track={$my_ticket['trackid']}{$email_param}
/* Get e-mail message for customer */ /* Get e-mail message for customer */
$msg = hesk_getEmailMessage('forgot_ticket_id','',0,0,1); $msg = hesk_getEmailMessage('forgot_ticket_id','',0,0,1);
$msg = str_replace('%%NAME%%', $name, $msg); $msg = processEmail($msg, $name, $num, $tid_list);
$msg = str_replace('%%NUM%%', $num, $msg);
$msg = str_replace('%%LIST_TICKETS%%', $tid_list, $msg); // Get HTML message for customer
$msg = str_replace('%%SITE_TITLE%%', hesk_msgToPlain($hesk_settings['site_title'], 1), $msg); $htmlMsg = hesk_getHtmlMessage('forgot_ticket_id','',0,0,1);
$msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $msg); $htmlMsg = processEmail($htmlMsg, $name, $num, $tid_list);
$subject = hesk_getEmailSubject('forgot_ticket_id'); $subject = hesk_getEmailSubject('forgot_ticket_id');
/* Send e-mail */ /* Send e-mail */
hesk_mail($email, $subject, $msg); hesk_mail($email, $subject, $msg, $htmlMsg);
/* Show success message */ /* Show success message */
$tmp = '<b>'.$hesklang['tid_sent'].'!</b>'; $tmp = '<b>'.$hesklang['tid_sent'].'!</b>';
@ -1248,4 +1250,15 @@ $hesk_settings[hesk_url]/ticket.php?track={$my_ticket['trackid']}{$email_param}
} // End forgot_tid() } // End forgot_tid()
function processEmail($msg, $name, $num, $tid_list)
{
global $hesk_settings;
$msg = str_replace('%%NAME%%', $name, $msg);
$msg = str_replace('%%NUM%%', $num, $msg);
$msg = str_replace('%%LIST_TICKETS%%', $tid_list, $msg);
$msg = str_replace('%%SITE_TITLE%%', hesk_msgToPlain($hesk_settings['site_title'], 1), $msg);
$msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $msg);
return $msg;
}
?> ?>

View File

@ -0,0 +1,10 @@
<p>Hello,</p>
<p>A new support ticket has been moved to your category. Ticket details:</p>
<p>Ticket subject: %%SUBJECT%%<br>
Tracking ID: %%TRACK_ID%%</p>
<p>You can manage this ticket here:
%%TRACK_URL%%</p>
<br>
<p>Regards,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,6 @@
<p>Dear %%NAME%%,</p>
<p>This email contains a list of support tickets submitted with your email address. Number of support tickets found: %%NUM%%</p>
<p>%%LIST_TICKETS%%</p>
<p>Sincerely,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

View File

@ -0,0 +1,9 @@
<p>Hello,</p>
<p>A new note has been added to ticket "%%SUBJECT%%".</p>
<p>Note by %%NAME%%:</p>
<p>%%MESSAGE%%</p>
<p>You can manage this ticket here:
%%TRACK_URL%%</p>
<p>Regards,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,8 @@
<p>Hello,</p>
<p>You have received a new private message from %%NAME%% with the following subject:</p>
<p>%%SUBJECT%%</p>
<p>You can view your new message by clicking on the following link:
%%TRACK_URL%%</p>
<p>Sincerely,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,7 @@
<p>Hello,</p>
<p>A customer has just replied to ticket "%%SUBJECT%%".</p>
<p>You can manage this ticket here:
%%TRACK_URL%%</p>
<p>Regards,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,9 @@
<p>Dear %%NAME%%,</p>
<p>Our staff has just replied to your ticket "%%SUBJECT%%".</p>
<p>You can view the ticket here:</p>
%%TRACK_URL%%
<br><br>
<p>Sincerely,</p>
%%SITE_TITLE%%
<br>
%%SITE_URL%%

View File

@ -0,0 +1,10 @@
<p>Dear %%NAME%%,</p>
<p>Your support ticket "%%SUBJECT%%" has been submitted.</p>
<p>We reply to all tickets as soon as possible, within 24 to 48 hours. If we expect your ticket will take additional time, we will update you by sending you an email.</p>
<p>Ticket tracking ID: %%TRACK_ID%%</p>
<p>You can view the status of your ticket here:
%%TRACK_URL%%</p>
<p>You will receive an email notification when our staff replies to your ticket.</p>
<p>Sincerely,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,9 @@
<p>Hello,</p>
<p>A new support ticket has been submitted. Ticket details:</p>
<p>Ticket subject: %%SUBJECT%%</p>
<p>Tracking ID: %%TRACK_ID%%</p>
<p>You can manage this ticket here:
%%TRACK_URL%%</p>
<p>Regards,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,7 @@
<p>Hi %%NAME%%,</p>
<p>We were told that you forgot your help desk password. It happens to everyone!</p>
<p>To reset your password visit the link below (expires in 2 hours):
%%PASSWORD_RESET%%</p>
<p>Thanks,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,9 @@
<p>Hello,</p>
<p>A new support ticket has been assigned to you. Ticket details:</p>
<p>Ticket subject: %%SUBJECT%%</p>
<p>Tracking ID: %%TRACK_ID%%</p>
<p>You can manage this ticket here:
%%TRACK_URL%%</p>
<p>Regards,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,8 @@
<p>Dear %%NAME%%,</p>
<p>Your support ticket "%%SUBJECT%%" has been updated to a closed/resolved status.</p>
<p>Ticket tracking ID: %%TRACK_ID%%</p>
<p>You can view the status of your ticket here:
%%TRACK_URL%%</p>
<p>Sincerely,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,9 @@
<p>Hello,</p>
<p>A support ticket assigned to you has been re-opened.</p>
<p>%%NAME%% has just re-opened the ticket "%%SUBJECT%%".</p>
<p>Tracking ID: %%TRACK_ID%%</p>
<p>You can manage this ticket here:
%%TRACK_URL%%</p>
<p>Regards,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%

View File

@ -0,0 +1,6 @@
<p>Dear %%NAME%%,</p>
<p>Your email needs to be verified before your ticket can be submitted. Please click the link below to verify your email.</p>
<p>%%VERIFYURL%%</p>
<p>Sincerely,</p>
%%SITE_TITLE%% <br>
%%SITE_URL%%