Need 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 an association, club, nonprofit, or other type of membership-based organization, you can save much more time using a membership management system to email your members, event registrants, or newsletter contacts.
If you'd like to give the number one membership management software a go, click here. In just an afternoon you can have a new contact database and website with online registrations set up and ready to go.
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.
Next, go to Tools: 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:
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.
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.
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.
Click Continue
Click Allow
And you can see that the formula is running.

Now you can check out the sent box in Gmail and see that it sent these emails.
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.