HTML Email Templates

Add a HTML header and footer to the emails that WordPress generates.

Version 2.0.6

  • Fixed: Compatibility with Subscribe by email
  • Updated: wp_htmlemail_nl2br` is set to false by default nowonwards


Version 2.0.6
  • Fixed: Compatibility with Subscribe by email
  • Updated: wp_htmlemail_nl2br` is set to false by default nowonwards

Version 2.0.5
  • Fixed: Password reset link missing for New users
  • Added: Convert Next line to line breaks (Use filter `wp_htmlemail_nl2br` to disable conversion )

Version 2.0.4
  • Fixed: Pro Sites compatibility
  • New: Option to switch off HTML Emails overwrite for existing HTML Email

Version 2.0.3
  • Fix: Show only published recent posts

Version 2.0.2
  • Fix: broken woocommerce text emails

Version 2.0.1
  • New: Send preview emil using ajax, instead of form submit
  • Fix: remove wpautop for html messages ( woocommerce compatibility)
  • Fix: mail not being site, if template is empty
  • Fix: content being replace multiple times for some templates

Version 2
  • New: Site wise template selection option
  • New: Added Templates and Instant Preview option
  • Filters: Works for template with sidebar:
  • htmlemail_sidebar_posts => List of posts to be displayed,
  • htmlemail_sidebar_title => Tile of sidebar

Version 1.1
  • Fix: Preserve other email headers

Version 1
  • Initial release

Version 0.1
  • Initial release - Beta
Downloads 19,577 Compatibility WordPress 4.3.1Multisite 4.3.1BuddyPress 2.3.5

HTML Email Templates allows you to use your beautiful HTML email templates for emails WordPress sends.

By default, WordPress sends out plain boring email notifications for events such as new comments, comments in moderation and new users.

Spice Up System Notifications

This plugin is for any brand-freak that loves completely white-labelled products, or for those who just want WordPress to send nice emails.

Get WordPress to send beautiful emails to you!

Complete Email Branding

Enable template override and choose different templates for each site on your network.You can even preview your styles and changes to see what they will look like.

HTML Email Templates for WordPress lets you brand one of the most important parts of your Website – Email Notifications.

To Get Started:

Start by reading the Installing Plugins section in our comprehensive WordPress and WordPress Multisite Manual if you are new to WordPress.

Note for Multisite installs: this plugin is designed to be network activated and, by default, it rebrands the emails for all sites network-wide. However, you can enable a template override option in network settings to allow different templates per site. More on this below.

Once installed and network-activated, you’ll see a new menu item in the Settings menu in your network admin: HTML Email Template.

HTML Email Templates Network Menu

When activated on a single site install, you’ll see the new menu item under Settings in your wp-admin. Note that if you enable the template override option in a network install, each sub-site in your network can access the settings here too.

HTML Email Templates Single Site Menu

Configuring Your Email Template

The first thing you’ll likely notice is that are really no settings for this plugin; it just works. :)

All you need to do is configure the HTML that will be used to rebrand all emails sent by your WordPress install, even the ones from BuddyPress if you have that installed.

If you’re not very handy with HTML, don’t worry, we’ve got you covered with several pre-made templates you can choose from. Simply click the “Choose from sample Templates” toggle located just beneath Step 1 in the instructions to pop open a slider where you can scroll through the available templates.

HTML Email Templates Template Select

Click the thumbnail of any template you like to highlight it, then click the “Load Template…” button to populate the large text area below with all the glorious pre-made HTML.

HTML Email Templates Template Load

Now click the “Preview” button to pop open a live preview of what your emails will look like with your selected template.

HTML Email Templates Template Preview

If you are happy with how your template looks out-of-the-box, click the “Save” button. Then click the “Test Email” button, enter your own email address and click “Send” to see your work pay off in your own inbox. Now all your WordPress emails will be sent using your selected template. How cool is that?

Allow Subsite Templates

If you are running a multisite install and want to allow your subsite admins to override your network template with their own custom stuff, check the box at the bottom of the network settings screen.

HTML Email Templates Network Override

Every site in your network will now have a settings screen enabling admins to customize the template to be used for all emails from their sites.

Customizing a Template

If you are not quite happy with how your selected template looks by default, you can customize it to your heart’s content by simply editing the HTML in the large textarea.

If you do not want to use any of the pre-made templates, you can enter your own custom HTML instead. Simply delete what is already there, and paste in your own.

If you’re not quite sure how to create your own HTML template that works and looks great in all email clients, check out this great tutorial from our blog.

You’ll notice that there are several variable placeholders throughout the HTML in each template, enclosed in parentheses like so:

To see all the available variables you can use when customizing your template, click the “List of variables that can be used in template” toggle located just beneath Step 1 in the instructions.

HTML Email Templates Template Variables

Each of those variables can be used anywhere you need them in your template. The one that must be used somewhere in your template to ensure that all your WordPress emails work properly is:

  • {MESSAGE} Outputs the email content (required)

All of these are optional:

  • {SIDEBAR_TITLE} Title for the sidebar in templates with a sidebar. Default is “What’s New?”.
  • {FROM_NAME} Sender’s name if sender’s email is associated with a user account.
  • {FROM_EMAIL} Sender’s email, email specified in site Settings.
  • {BLOG_URL} Blog / Site URL.
  • {BLOG_NAME} Blog / Site name.
  • {ADMIN_EMAIL} Email address of the support or contact person. Same as {FROM_EMAIL}
  • {BLOG_DESCRIPTION} Taken from the Tagline as entered in the site Settings.
  • {DATE} Current date as configured in the site Settings.
  • {TIME} Current time as configured in the site Settings.

Additional Customization Options

You may have noticed that there is one sample template that has a sidebar in it. That template also has something special that can be used in other templates too: a linked list of your most recent blog posts.

Go ahead and select that template now; you can’t miss it, it’s called “Sidebar”. :)

Scroll down to about halfway through the HTML until you see 4 list items like this:
<li style="margin: 0; padding: 0; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; list-style-position: inside; margin-left: 5px; display: block;"><a class="" href="%7BPOST_1_LINK%7D" style="margin: 0; padding: 10px 16px; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; color: #666; border-bottom: 1px solid #777777; border-top: 1px solid #FFFFFF; cursor: pointer; display: block; margin-right: 10px; text-decoration: none;">{POST_1} »</a></li>

Those 4 list items will include the titles of the 4 most recent posts in your blog, and link back to them on your site.

The code can be copied to any other template, or used in your own custom HTML too. You can modify the HTML & CSS to fit your branding, but there are 2 things that must be present in each one for this feature to work:

Those are the filters & placeholders that fetch the permalink & title of the posts. You can have up to 4 of them as seen in the “Sidebar” template, but if you only want 1, 2 or 3, simply remove what you don’t need.

Advanced: there are also 2 filters you can use in case you want to include some other posts in your emails:

  • htmlemail_sidebar_title to change the sidebar title (takes a string).
  • htmlemail_sidebar_posts to change the post list (takes an array of posts containing ID and post_title).

Sample codes for each of the above filters to come soon.

We hope you, your users and your email recipients enjoy your new HTML Email Templates! If you get stuck with any of the options or features, or have a feature suggestion to make, head on over to the community forums where staff and stellar members are standing by to lend a hand. :)

HTML Email Templates Features

Go big on style.

  • Use preexisting HTML Templates
  • Choose available template with plugin for WordPress notifications
  • Add a simple header and footer to every email
  • Make WordPress notifications responsive
  • Better branding
  • Style preview