Template Mailer


Template Mailer allows you to send customised HTML emails which will maintain their look and feel across a variety of email clients, even those that strip out CSS, like Google. See the Comparisons page for screenshots of different email clients.

It has some design features that make it a snap to send emails:

  • Uses standard HTML (PHP) files as email templates
  • Converts external CSS into inline styles
  • Sets email subject and sender using standard HTML tags
  • Parses PHP on first load, then subsequently populates content using {{placeholder}} tags

Internally, it strives for efficiency; namely:

  • Caching converted HTML until original template is modified
  • Efficiently repopulating templates for quick batch creation of emails
  • Storing email parameters within the template (so no need for config)

Download it here: mailer.zip, or feedback.

Quick start

Code example

Because core parameters are set up in the email template, sending an email really is as easy as selecting a file, passing it some data, and calling send:


Mailer has a bunch of ways to minimise the amount of configuration and setup you need to do. See the Usage section for more info.

More info

  • Get started using the library in Usage
  • See how to customise setting in Configuration
  • See what commands are available in the API Guide
  • Or check out a live Demo