Magento and the Intervals Emogrifier Class

John Reeve | December 2nd, 2014 | , ,

Magento and the Intervals Emogrifier Class

When we originally developed the “Email this Page” feature for Intervals, we faced a significant hurdle. How were we going to combine the HTML and the external CSS into one email so clients like Gmail, Outlook, and Mac Mail, could display the email properly? These email clients do not play nice with external CSS, nor CSS inside the <style> tag.

The only realistic solution was to somehow extract the CSS rules from the external CSS files and insert them into the HTML as inline style. Yikes! We really wanted to include this feature in our software, and through our determination we found a way to make it work. A few months after launching this new feature we decided to release the code as Open Source.

Since then, the Emogrifier source code has been available on GitHub. We’ve been fortunate to reel in a few talented contributors who are keeping the Emogrifier class up to date and adding new features. And just this week, we received word from Magento contributors Classy Llama that it’s now being included in the eCommerce platform, one of the most popular in the world. More specifically, the Emogrifier class is being used to inline the CSS for the Magento responsive email templates.

The documentation about responsive emails can be found here:

We just want to say “thank you” to our Emogrifier contributors on GitHub, and “thank you” to Classy Llama and Magento for including our code for CSS inlining in their eCommerce platform.

One Response to “Magento and the Intervals Emogrifier Class”

  1. Erik Hansen says:

    For the first six years of Magento’s existence, if a merchant or developer wanted to customize Magento’s email templates, they had to modify inline CSS in dozens of email templates. It was a pain.

    Your Emogrifier class which is now being used by core Magento will allow emails to be customized much more easily since the CSS and HTML for emails are cleanly separated. Thanks for releasing Emogrifier as open source!

    ~ Erik Hansen, Classy Llama

Leave a Reply

Intervals Blog

A collection of useful tips, tales and opinions based on decades of collective experience designing and developing web sites and web-based applications.

What is Intervals?

Intervals is online time, task and project management software built by and for web designers, developers and creatives.
Learn more…

John Reeve
Author Profile
John Reeve

John is a co-founder, web designer and developer at Pelago. His blog posts are inspired by everyday encounters with designers, developers, creatives and small businesses in general. John is an avid reader and road cyclist.
» More about John
» Read posts by John

Jennifer Payne
Author Profile
Jennifer Payne

Jennifer is the Director of Quality and Efficiency at Pelago. Her blog posts are based largely on her experience working with teams to improve harmony and productivity. Jennifer is a cat person.
» More about Jennifer
» Read posts by Jennifer

Michael Payne
Author Profile
Michael Payne

Michael is a co-founder and product architect at Pelago. His contributions stem from experiences managing the development process behind web sites and web-based applications such as Intervals. Michael drives a 1990 Volkswagen Carat with a rebuilt 2.4 liter engine from GoWesty.
» More about Michael
» Read posts by Michael
Videos, tips & tricks