Here’s how I did it.
Yes, there are excellent email sending services out there. I decided against going with a Mailchimpish solution for The Quit Work Project because I didn’t want to pay anything (this is a personal project from which I don’t anticipate any revenue) and I didn’t want any third-party marketing at the bottom of my emails.
I use Mailgun https://www.mailgun.com/ which offers 10,000 emails a month for free. It’s extremely easy for software developers to integrate into a web site.
Subscribe’s the hard part, because there are bots that tirelessly fill any form they can find on the web. I hate captchas (if I’m asked to select all the squares with buses or bikes one more time I’m liable to throw my laptop out of the window), so I used a few other tricks to thwart the bots:
• create the subscribe fields and buttons in Javascript rather than have them hard-coded in HTML (I bet there are few bots that bother running Javascript);
• create fields that are visible to bots but invisible to humans (if there’s text in those fields, it’s probably spam);
• measure the time between page load and submit (if it’s less than seven seconds, it’s probably spam).
When someone (human) subscribes, I send an email through the Mailgun API asking them to confirm their email address by clicking a link with a code that identifies them. No confirmation, no subscribe.
All my content is in a database, so that it can be formatted for web, email, Twitter, Instagram, etc. I have a script that’ll send a test email to myself through the Mailgun API, so that I can check whether the content is correct, then send an email to everyone who has subscribed and confirmed but hasn’t unsubscribed. I do this every day to send daily reasons to quit work to subscribers to the The Quit Work Project.
I hate unsubscribe links that require you to do further work to unsubscribe (e.g. after you’ve clicked the link, you have to enter your email address, select which lists you want to unsubscribe from, etc.) So I include an unsubscribe link in each email with a code that identifies the subscriber, so that you’re unsubscribed from all emails in just one click.
That’s one of the great things about a service like Mailgun: software developers can very easily customize emails for individual subscribers.
Any questions about what I did? Have you automated email sending in some other way? I’d love to hear from you.