Send html email with Mailchimp and Drupal

par | 10 Avr 2011 | Web, digital | 0 commentaires

It is my first attempt to write a story in English on this blog. Feel free to comment if my syntax is wrong or not understandable.

6 months ago I was beginning to work with Drupal in my professional environment. One of my goals was to provide the best newsletters showing Drupal templated contents. Because I work daily on 15 websites, it was not possible for me to create manually all the newsletters I have to send. I really needed to use templates to automatize the creation of all my newsletters. Consequently I have found the solution to use the RSS function of Mailchimp.

Mailchimp provides tools to put the content of an rss feed into an html or plain-text newsletter. The problem was that the control on the layout was really limited. I wanted more options to customize my templates and decide how my newsletters looks like. By reading the Mailchimp corporate blog (, I have found a great idea: use only one rss item containing all my items including their css styles.

My only problem was to build a template in Drupal to render an rss feed. The use of panels and views brought to me the ability to tweak all the aspects of my contents.

For the people which could be interested to reproduce my solution, you can read the summarize of my method:


In Drupal

  1. Create some views in Drupal showing your contents (last news, last stories, last comments, etc.), tweak the views to show the good content with the good filters, choose the good template to show your data
  2. Use the templating system to override the default presentation of the views (views-name.tpl.php) URL (Drupal templating system)
  3. Go to the folder /modules/panels/plugins/layouts/ and choose which layout you want. Duplicate this and rename.
  4. Create a page with the panels module and select your layout
  5. Insert all your views in the page and preview
  6. Use a text editor to customize you rss feed and add xml tags around you core template
  7. Test your template with rss test (W3C URL) because the compatibility for your feed is really necessary for Mailchimp import tools


RSS Driven Campaign in Mailchimp

In Mailchimp

  1. Create a new campaign with the type « RSS Driven »
  2. Insert the URL of your feed in the dedicated field
  3. Preview and test your campaign, tweak you template in Drupal in order to obtain the appropriate graphic design

The creation of this system is a little bit longer but it provides a great control to send email campaign from Drupal.

I can provide more detailed explanation by interests.



Insert the URL of your feed here

0 commentaires

Soumettre un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.

Journaux de bord récents