Email Templating With Theme Layouts

Add your own branding to all outgoing emails originating from JReviews.


We introduced Theme Layouts in the theme customization section, and email templating is a great use for them.

All emails sent by JReviews are wrapped by the email.thtml layout. You can take advantage of this to add header, footer, and anything else you want to be included in every email.

Getting Started

Copy the email.thtml layout to your custom theme. If you are using EngageUsers, the Add-on has a separate email layout, so you would also need to include that layout. Both are shown below:

|-- themeInfo.xml
`-- theme_layouts/
    |-- email.thtml
    `-- engageusers_mail.thtml

Clear Cache & File Registry
Clear the registry in the JReviews admin CP after creating new files in overrides.

Email templating comes with its own set of challenges for writing proper HTML and CSS that is compatible with different email clients. This is something that is beyond the scope of this article.

If you wanted to add a header and a footer to all the outgoing emails, in its simplest form, your customized layouts would looks something like this:

  Email Header

<div style="padding: 20px 0;">
  <?php echo $content_for_layout;?>

	Email Footer


Native Email Templating

JReviews uses native mailing in Joomla and WordPress to send its emails. If you want a templating system that works for all outgoing emails, and not just JReviews, then you need a 3rd party solution.

If you already use mail templating solution that works with JReviews, please share it so we can include it below:

WordPress Email Template Plugins