Forgot Password?

Log In Register
EE Spotlight  /  ExpressionEngine Tutorials  /  Integrating HTML Emails With ExpressionEngine

Integrating HTML Emails With ExpressionEngine

I love finding ways of making the ExpressionEngine experience as seamless for my clients as possible and I have found website owners migrating from less intuitive platforms truly grateful for my efforts. However, just as they start feeling smug at having mastered their new CMS they are faced with having to get to grips with an entirely different system for creating and distributing HTML emails. In recent projects I have been looking at ways of integrating this process with their ExpressionEngine control panel in a way that means they don't really need to learn anything above and beyond what they already know for editing their site.

There are numerous ways of achieving HTML email integration with ExpressionEngine but in this article I am going to focus on a method I developed for one particular client that was a little bit unusual but that worked rather well.

To DIY or not to DIY

Before deciding how to integrate HTML emails with EE you have a fundamental choice to make, do you really want to send the emails directly from your website's host server or would you be better to integrate an external service such as Campaign Monitor or MailChimp who specialise in mass mailing?  These are the four main factors I think about before making a decision.

1.  Can the server deal with the volumes of email I expect to be sending?

Most hosting providers impose a cap on the number of emails a user can distribute from their servers and this limit can vary greatly.  This blog article provides details on some of the limits imposed by various hosting providers http://www.massmailsoftware.com/blog/2011/03/smtp-email-sending-limits-and-rates-for-hosting-providers-and-free-email-providers/ but it is best to check with the host before proceeding.

2.  Can my client afford an external solution

In my opinion, services such as Campaign Monitor and MailChimp are great but expensive, especially when it comes to smaller clients with smaller mailing lists.  Maybe a DIY solution is the more cost effective route.

3. Do I want to be held responsible for the distribution?

Clients tend to feel quite sensitive when it comes to the success of their HTML email campaigns and whilst fully integrating the entire process can make their life simpler it can also make your life more stressful.  What happens if the email server crashes half way through the distribution?  What if all the emails get spammed or bounced?  At least if you are using an external company you can look in their direction but if it is based entirely on a system you setup then you know where the buck stops. That being said if the system is solidly built and well tested then it's probably still worth the hassle but maybe just think twice when it comes to those really scary clients.

4. Will a DIY solution go far enough?

Whilst most commercial Expressionengine HTML email addons provide a level of statistical data such as unique opens, clicks etc.., none of them match the depth of insight provided by the large external mailers.  If your client is the sort to spend hours drawing pie charts and crunching the numbers then maybe consider using a more advanced external solution.

A DIY solution for Expressionengine 1

Recently I had a client who wanted to distrute a regular HTML email, based on a single template, to their fairly modest sized mailing list.  The website was running on Expressionengine 1, the budget was extremely tight and the process needed to be super easy.  Having done some digging I came up with a solution that I feel really hit the mark when it comes to both price and simplicity.

First I installed the YUI Communicate extension which places a WYSIWYG editor in Expressionengine's communicate tab.  I then installed the Multiple Newsletters extension by Cocoaholic which automatically populates the communicate publish form with an appointed EE template.

Finally I created an EE template based on the design of their HTML newsletter and set up a new weblog to provide the main changeable area of text for the newsletter.  Having added the tags for this new weblog to the template plus any content that I wanted to be included from other parts of their site such as news feeds and banners, my part was just about done.

The end result meant that the client could write for their newsletter as they would any other entry on the site and open up the  communicate tab to find a fully rendered version of their email in the WYSIWYG editor, ready for distribution to their mailing lists. They could hit the 'View Previously Sent Emails' button to browse older emails and a web hosted version of the current email was instantly available thanks to the fact that this method utilises standard EE templates.

Other solutions

This method is great for a certain type of client running EE1 but what if your client doesn't fit this description?  Here are a few alternatives:

Firemail (EE2) - $49.95 by Put your lights on


The closest thing to my DIY method for EE2 is Firemail, an addon that keeps the entire 'create and distribute' process within the bounds of EE.  Templates can be imported and parsed similarly to my method and the bonus of basic statistics and a slick user interface make it well worth the money if budget allows.  The same provisos regarding mail server capacity apply to this addon and it is probably best used in conjunction with a robust mail server or less demanding mailing lists.  Email batch size can be set from Firemail which may help ease this issue.

Champagne (EE1 & EE2) - $35 by Natural logic

Champagne integrates your Campaign Monitor account with Expressionengine 1 or 2 . Whilst I haven't used Champagne on an Expressionengine site yet, Campaign Monitor is probably my favourite email distribution service and the integration this module provides looks very polished.  The module displays basic statistics on each campaign and whilst it does not provide the full breadth of options that are available from the Campaign Monitor control panel, it is probably a more manageable amount of information for the majority of clients.

Chimper (EE2) $TBC by Ducktee

Chimper integrates your MailChimp account with Expressionengine 2 allowing you to edit, distribute and monitor the emails in a really clean 4 step process.  I loved what I saw of this addon when it was briefly available for download but unfortunately it seems to be back in development pending a beta release.  One to watch.

Author: Michael Sibley

In my previous life I was a full time artist but when I discovered I could get the same creative buzz from web design whilst getting paid enough to buy both food and clothes, I decided it was time to get a 'proper job'. Having re-trained I spent 4 years as head of digital media at Birmingham PR and Marketing agency Happy Giraffe before buying myself a shed and going freelance.

Have an Article Idea? Learn About Becoming a Contributor ›

5 Comments...

If going for a DIY solution you may want to look at using smtp.com to allow you to send bigger volumes without overloading your own server.

If you're sending more than a few thousand emails it's also worth putting your image files on another server or CDN, That's a lot if hits in a short space of time.

Lastly make sure your SPF records are set on your DNS or a sizeable proportion of your mail will end up in trash.

"paid" solutions aren't looking so expensive once all this is taken into account!

+1 for using EE to create the HTML emails though, if you're smart you can re-use a lot of content and considerably speed up the process.
Published on 30 June 2011
It's also worth mentioning that MX Universal Editor for EE1 by Max Lazar also adds the ability to turn the Communicate textarea into a WYSIWYG (TinyMCE) editor.
Published on 30 June 2011
Campaign Monitor and MailChimp are great but expensive"


Did you know that Mailchinp is free up till 2000 mail adresses and 12000 mails a month? The only thing that you'll have is the mailchimp button in the bottom of your mail. If you have more addresses then I'd advise Mailchimp or Campaign monitor anyway, since it will be a serious number of mails that you'll have to send through you hoster. These services also allow users to update their e-mail addresses and will track bounces.

That said, Mailchimp is quite complex for non tech users, so "Chimper" looks like a great solution.
Published on 02 July 2011
If you go the Mailchimp or Campaign Monitor route, Stephen Lewis from Experience Internet has created a couple of add-ons that automatically place members into mailing lists for you.

Mailchimp: http://experienceinternet.co.uk/software/mailchimp-subscribe/

Campaign Monitor: http://experienceinternet.co.uk/software/campaigner/

However, you'd still have to use one of the resources above if you want the EE Control panel to handle the creation of the email. I've heard that some people use EE to produce the email code in a template, then just copy/paste it into the Mailchimp or Campaign Monitor control panel. It is a lot more clunky to do it this way, but at least you get the benefit of EE creating the email for you based off of content that you may already have in the system.
Published on 02 July 2011
I particularly fancy MailChimp.

I'm actually working out a solution that is going to allow the members on our site to subscribe their mailing list to their personal Mailchimp account through the API so they can manage everything in EE. MailChimp's 2,000 free subscribers works out great because most of our clients have about 200 - 300 people on their list.

These clients are managing a monthly mailing list from the Front End because the CP is not ideal so that has made things more difficult but I've made progress and I hope to work out the kinks soon!

I'm also working out how to create email templates from a SAEF form and then pass that info to MailChimp to create a ready to go campaign.

I may try to make some kind of extension or module but I'm not sure if it would really benefit anyone else but me.
Published on 11 July 2011

Add Your Comment






Note: You can write in code snippets as long as you wrap them in [code] [/code] tags.