The quick, easy, free way to send mail-merged email from a Mac

Suppose you’d like to use your Mac to send a couple hundred* customized emails once in a while, importing the recipient’s email + name + other data from a CSV file.

You’d think it would be a piece of cake.

Turns out, Apple Mail is worthless in this respect. Open Office has a built-in mail merge feature but it is poorly documented and horribly designed and works even worse. There is a Mac app called MailMergeApp, but it’s useless if you need to merge data from anything other than your Address Book.

Here’s how to do it using free software, and get it working in a few minutes:

1) Install the Thunderbird email client, at least for the purposes of sending merged-emails. (You don’t have to throw away your favorite email client.) We installed Thunderbird and configured it to use a dedicated outbound email address*.

2) In Thunderbird, open Tools > Addons and find and install the “Mail Merge” addon.

3) Follow the detailed step-by-step instructions on the Mail Merge webpage.

We particularly like the “send later” feature which creates each email and puts it in your Outbox, so you can make sure it all looks good before you do File > Send unsent messages

** Note, if you’re sending from a non-bulk-sender account (such as a typical Gmail or Godaddy email address), just keep in mind you probably have a maximum of 250-500 emails you can send per day. *

Rails apps can send from multiple SMTP accounts

One of our Rails apps send both bulk email blasts, and also onesey-twosey non-bulk emails such as welcome emails or follow-up emails.

We wanted the non-bulk emails to actually come from one of our monitored customer service accounts, while still using Sendgrid for our bulk email blasts.

When we searched, we found a lot of schemes for configuring Rails to permit multiple SMTP accounts, however they seemed overly complex.

Here’s how we solved it very simply:

  • In addition to our existing user_mailer.rb, we created a new non_bulk_mailer.rb.
  • We removed the ‘normal’ SMTP configuration from environment.rb
  • At the top of each of our xxxx_mailer.rb class definition files we added self.smtp_settings = with the appropriate smtp configuration hash
  • We moved the ‘personal’ email handlers out of the original user_mailer.rb and into non_bulk_mailer.rb (and moved the associated views as well)

So our mailer classes each look like:

class NonBulkMailer < ActionMailer::Base
self.smtp_settings = {
:address => ENV['MF_NONBULK_ADDRESS'],
:port => ENV['NONBULK_PORT'], 
:domain => ENV['NONBULK_DOMAIN'], 
:user_name => ENV['NONBULK_USER'], 
:password => ENV['NONBULK_PWD'] } ...

Note we keep the passwords etc in environment variables, so each environment (local, Heroku staging, Heroku production) can have their own settngs, plus all passwords are kept out of our git repository.