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 (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:
- 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
- Use the templating system to override the default presentation of the views (views-name.tpl.php) URL (Drupal templating system)
- Go to the folder /modules/panels/plugins/layouts/ and choose which layout you want. Duplicate this and rename.
- Create a page with the panels module and select your layout
- Insert all your views in the page and preview
- Use a text editor to customize you rss feed and add xml tags around you core template
- Test your template with rss test (W3C URL) because the compatibility for your feed is really necessary for Mailchimp import tools
- Create a new campaign with the type « RSS Driven »
- Insert the URL of your feed in the dedicated field
- 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.