Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

email template wrapper (header/footer)

Hi. Wondering if there's anywhere I can mod the emails that's sent to adjust the what is include before and after the template editor?

I adjust all template information, what is sent when creating new ticket email, response ticket emails and so on. All this is made in the admin panel.

What I would like is to be able to insert html and css before and after the admin panel editor window. So what I adjust in the admin panel is just the actual content.

Is this possible?


  • To make the question more simple.

    I would like to be able to change the whole email template. From <html> and <head>.
  • Looking at the database when trying to create a full html email with header and css is that the editor removes everything outside <body>.

    So in database table 'ost_draft' holds almost the complete mail. Css is there but no html tags for header so the css is read as a bunch of text.

    Looking in 'ost_email_template' what I'm guessing is the final result that is used for posting emails. There everything is removed except for the content that was inside <body>
  • Found it. 

    look at /include/class.mailer.php

    Somewhere at line 176.
    Include the html content you want.

    $message = "<html><head></head><body>" .$message. "</body></html>";

    Right before $mime->setHTMLBody($message);
Sign In or Register to comment.