Site Building

Create a Custom Email Template for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Sprout Video

One of the best features of MailChimp is its awesome template creation tools, and their ability to allow anyone to create beautiful email templates. Unfortunately, the templates created in MailChimp are not supported by the Drupal MailChimp Campaign module without a little extra work. In this tutorial we'll take a look at creating a template in MailChimp using their drag and drop template creator. Then, we'll walk through the extra steps required in order to have these custom templates you create available in Drupal when using the MailChimp Campaigns module to send a campaign.

In addition to just making the templates appear in Drupal, we’ll also want to declare which regions in the template should be editable within Drupal. So we’ll use the mc:edit="" HTML attribute in our template. Any DOM element we add this attribute to will become a section, which content creators on our Drupal site can insert content into.

By the end of this tutorial you should be able to create a custom email template in MailChimp and know how to make it show up as an option in Drupal. You should also understand how to edit your template's code to include editable regions that Drupal can display and editors can use.

Further your learning

  • Why do you need to export a template to HTML and then re-import it?
  • What does the custom `mc:edit` attribute do in an HTML email template?
  • Further exploration: Can you create a new template that is a 2x2 grid, and make that template available to someone creating an email campaign in Drupal?

Series Sponsored by MailChimp

Additional resources