- Edited
Original Author - bkonia - (http://osticket.com/forums/showthread.php?t=6393)
I think I've got this to work in 1.7
Should just have to copy and paste the Updated Mod & Create the Html_email_Template DB entry as described below.All the changes are still commented with the original authors initials, BSK.
Login to PHPmyadmin > Select osTicket DB.
Run SQL command:
ALTER TABLE `ost_config` ADD `html_email_template` TEXT NULL DEFAULT NULL
include/class.config.php - Add @ ~ line 548
function getHtmlEmailTemplate(){ //BSK Retrieve HTML email template
return $this->config;
}
Then Add the Following around Line 733
.',html_email_template='.db_input($vars) // BSK Update HTML email template
include/class.email.php
Add after "//do some cleanup"
$htmlbody = str_replace('%message', str_replace("\n", '<br />', $body), $cfg->getHtmlEmailTemplate());
Then Add the following after " $mime->setHTMLBody($htmlbody); "
if (strpos($cfg->getHtmlEmailTemplate(), '%message') !== false) //BSK If %message is found in the HTML email template, create HTML body MIME part
$mime->setHTMLBody($htmlbody);
include/staff/settings-emails.inc.php
After Line 104 Add...
</tr>
<tr><th>HTML Email Template:</th><?php //BSK HTML email template ?>
<td><textarea rows="15" name="html_email_template" style="width;"><?=$config?></textarea><br><i>Will be used for all outgoing emails.<br />Insert %message where you want the message text to be replaced in the template.</i></td>
</tr>
After you impliment the above mod - Open class.ticket.php and comment out the following lines of code: ( x5 total )
//if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()))
// $msg ="\n$tag\n\n".$msg;
This will Make sure that the ReplySeparator does not get included twice on Replies.
~Cheers
UPDATE:
It turns out that using this MOD breaks being able to send attachments via the in ticket e-mail reply system. I assume this is because I inadvertently used the 1.6 version of class.email.php. As far as I noticed - this is the only thing that breaks. If someone figures out how to translate this document to 1.7 I would be grateful.
--------------------------------------------------------------------------------------------------------------------------
Check out My (1.7 Setup & MOD Guide)