3

Send html email with Mailchimp and Drupal

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.

drupal modules 300x104 Send html email with Mailchimp and Drupal

Drupal is a modular CMS which provides many functions to customize the system to your needs

For 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 (blog.mailchimp.com/), 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
Capture d’écran 2011 04 10 à 21.57.39 277x300 Send html email with Mailchimp and Drupal

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.

Capture d’écran 2011 04 10 à 21.58.44 300x121 Send html email with Mailchimp and Drupal

Insert the URL of your feed here

adminSend html email with Mailchimp and Drupal

Comments 3

    1. Post
      Author
  1. Martine

    Merci pour cet exposé qui m'intéresse beaucoup. Néanmoins des zones sombres subsistent pour moi… Serait-il possible d'expliciter le point 2 ? Un exemple peut-être ? 

Laisser un commentaire

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