How to Send Mass Unique Emails using Gmail (Not Mail Merge)

Terry Ibele 06 April 2016 0 comments

how to send mass personalized emails gmailNeed to use gmail to send out a massive amount of unique emails such as:

  • An email to all your students with their unique grades
  • An email of individual results to all participants from a competition
  • A personalized thank you message to each guest at an event
Note: this is NOT how to do Mail Merge

If you’re looking to send mass emails with the same message to everyone, you can still follow this solution, but you would definitely do better with a membership management system, such as Wild Apricot.

send mass emails gmail 

How to Send Mass Personalized (Unique) Emails using Gmail

I recently came into a situation where I needed to send 400+ UNIQUE emails.

The writing association I volunteer with held a writing competition, where each entrant would be emailed back personalized feedback on their story.

Over 400 people entered and I needed to email each one of them back with their unique feedback. I had a spreadsheet with each person's email beside their feedback.

But, I did not want to sit for hours at my computer and copy and paste these unique messages into over 400 emails. Putting aside the monotony of this task, I knew it would be highly prone to error. Paste 1 email address wrong, and someone gets the wrong feedback. Not acceptable. Plus, everything had to be kept strictly confidential.

What I discovered was that Google can do this automatically using a very simple code. THANK GOODNESS!

Believe me, I am not someone who is familiar with code at all, and I had absolutely no trouble figuring this out and making it work.

 

Here's How:

Make sure you are signed into your Google Account and that you open the Google Drive associated with your Gmail Address (if you don’t have more than one Google Account, don’t worry about this). Now open a Google Sheet.

Paste your email addresses in column 1. Paste the corresponding unique email messages in column 2.

how to send mass personalized emails gmail google sheet

Next, go to Tools: Script editor

how to send mass personalized emails gmail script editor

Copy and paste the below script into the editor

 function sendEmails() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 1;  // First row of data to process
  var numRows = 100;   // Number of rows to process
  // Fetch the range of cells A1:B100
  var dataRange = sheet.getRange(startRow, 1, numRows, 100)
  // Fetch values for each row in the Range.
  var data = dataRange.getValues();
  for (i in data) {
    var row = data[i];
    var emailAddress = row[0];  // First column
    var message = row[1];       // Second column
    var subject = "Hello, how are you?";
    MailApp.sendEmail(emailAddress, subject, message);
  }
}
(I got this code from Hugo Fierro from the Google Apps Script Team & tweaked it slightly)

Like so: 

how to send mass personalized emails gmail code1

Important points about this script.

This script will only send the first 100 emails in your Google Sheet. I’ve highlighted the fields that show this. If you want to send more, like 500 emails, simply change the number to 500.

how to send mass personalized emails gmail code2

The one caveat of this formula is that it will send THE SAME SUBJECT LINE TO ALL EMAILS on your list.

I’ve circled the subject line that will send to all your emails. You can easily change the subject line to whatever you like.

Note:
If you’d like to send each email a different subject line, this formula will not help you.

how to send mass personalized emails gmail code2

Once satisfied with your subject line, click the arrow button, which will run the formula. This will execute the formula to send your emails.

Note: it's always a good idea to run a test first! To do this, just place your own email and a dummy message in your spreadsheet and remove everything else.

how to send mass personalized emails gmail run

Click Continue

verify1

Click Allow

how to send mass personalized emails gmail verify2

And you can see that the formula is running. 
how to send mass personalized emails gmail running

Now you can check out the sent box in Gmail and see that it sent these emails.

how to send mass personalized emails gmail sent

And voila! That’s it!

FYI: Google allows you to send a max of 2,000 emails/day

 

Additional Resources:

Editor's Note: This post was originally published in April 2016 and has been updated for accuracy and comprehensiveness.

Get a Special Report on Simplifying Membership Management

Enter your email and receive this special report in your inbox.
Terry Ibele [Learning Apricot]

Posted by Terry Ibele [Learning Apricot]

Published Wednesday, 06 April 2016 at 4:54 PM

Get a Special Report on Simplifying Membership Management

Enter your email and receive this special report in your inbox.
Sorry, this blog post is closed for further comments.