Sending Recurring Emails to Thousands, using Simplenews as a Backend
I recently had a rather unique project requirement on one of my sites: I needed to send out a weekly email to hundreds (soon to be thousands) of site users, with the same template each week, but with the latest data from the website.
Basically, what I wanted to do was create a View on my site of the latest 10-12 items, and have that view be sent out to everyone (along with the views header/footer) in HTML (with a plain text alternative, of course), but I didn't want to have to create a new newsletter by hand each week to do this (this is something at which the Simplenews module excels... minus the automation).
After debating over whether I should write my own module to do the dirty work of sending out batches of emails, using modules like Views Send along with Rules and Views Bulk Operations, and some other crazy ideas, I finally found a potent combination for sending out automated weekly newsletters in a highly performant and optimal way, using the following modules:
- Simplenews (for queuing/sending emails, managing subscriptions)
- Rules (for scheduling the newsletters)
- Elysia Cron (for easy cron scheduling and performance)
- Views (to build the body of the newsletter)
- Mime Mail (to send HTML emails, and to be able to easily have a custom email-friendly stylesheet)