RSS

Send html email with Mailchimp and Drupal

10 avril 2011 2 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.

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 contents. Because I work daily on 7 websites, it was not possible for me to create manually all the newsletters I have to send. I really need to use templates to automatize the creation of all my newsletters. Consequently I have found the solution to use the RSS function of Mail chimp.

Mailchimp provides a function to send the content of an rss feed in an html or plain-text newsletter. The problem is that the control on the presentation of the news items is really limited. I want more options to customize my templates and decide how my newsletters look like. By reading the Mailchimp corporate blog (URL), I found a great idea: to 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 tinplating 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

Articles

2 Commentaires → “Send html email with Mailchimp and Drupal”

  1. Paul 9 months ago   Répondre

    Excellent article – thankyou!

    • admin 9 months ago   Répondre

      Très heureux d’avoir pu me rendre utile !

      Simon

Ecrire une réponse

*