Send Personalized Emails with SMTP and Mail Merge in Google Sheets

The Mail merge add-on lets you send personalized emails to multiple recipients in one go. The emails are always sent via your Gmail account or your Google Workspace email address. Google also imposes a limit on the number of emails you can send per day.

Mail Merge with SMTP

Mail merge is convenient because you can put your contacts in a Google Sheet and the add-on will individually send the emails for you. However, if you aren’t using Gmail or have a large mailing list, an SMTP service like SendGrid or AWS may be more a suitable option for sending out personalized emails.

Wouldn’t it be nice if you could enjoy the ease of the Mail Merge add-on while still utilizing an SMTP service to send personalized emails? That’s where the Document Studio add-on can help.

Generate SMTP Credentials

Google for SMTP settings for [your email provider] and you’ll find the SMTP server address, port number, and the authentication details like the username and password (or API key) for your email service.

For instance, if you plan to use Zoho Mail for mail merge, the SMTP settings would be as follows:

  • SMTP Server: smtp.zoho.com
  • Port: 465
  • Username: Your Zoho account email address
  • Password: Your zoho.com password

Send Email with SMTP

Prepare Mail Merge Data

Open the Google Sheet with your mail merge data and launch the Document Studio add-on. Create a new workflow and choose the Send Email task.

From the list of Email Service providers, choose SMTP Server and enter the SMTP server address, port number, and the authentication details that you found in the previous step.

SMTP for Mail Merge

Next, move to the Email Message section and configure your email template. You can use placeholders like {{First Name}} and {{Title}} in the message body and subject line to personalize the emails.

If you would like to attach files to the email, you can do that as well. You may attach the same file to all emails or use placeholders to attach different files to each email.

Click the Preview button and you should see a sample email sent to your own email address through the SMTP server. You can now click the Save and Run button to send personalized emails to all recipients in your Google Sheet.

How to Change the Reply-to Address in Mail Merge

When you send an email campaign through Gmail, you’ve an option to specify a different reply-to email address for your emails. When the email recipient hits the “Reply” or “Reply All” button, the To field in their email reply will be automatically populated with the email address that you’ve specified as the Reply-to email at the time of sending.

You can even specify more than one email addresses in the reply-to field, separated by commas, and they will all show up in the To field of the reply field. For instance, you could send emails from your own email address but the replies would be received in your email inbox as well as the support team.

To get started, open your Google sheet, go to the add-ons menu and choose Mail merge with attachments.

Next click on the Configure menu to open the Mail Merge sidebar.

Change Reply-to Email address

Here go the Reply-to address file and type an email address. If you wish to receive replies on multiple email addresses, type them all here separated by commas.

Now when you send the email campaign, open one of the emails in the sent items folder, expand the message header and you should see the specified email addresses listed in the reply-to field.

Different Reply-to address

Why is Google Ignoring the Reply-to Address

If you send a test email to yourself, you’ll get the email in your inbox. If you hit the reply button in that message, you may notice that that reply-to field contains your own email address and not the custom email address(es) that you’ve specified in your mail merge.

That’s the default behavior in Gmail if the “from” address on an email message is the same as the “to” address or is one of your own email aliases. To test your reply-to functionality, you should send emails to an email address that is not connected to your current Gmail account or set the “From” address as a non-Gmail address.

How to Send Emails from a Different Address (Alias) with Gmail

Say you have two email accounts - personal@gmail.com and work@company.com - the former is your personal email address while the latter is your work (corporate) email address. You are logged into your personal Gmail account but would like the mail merge to go out from your work account.

Consider another scenario where the personal secretary needs to sends out emails on behalf of her boss. So she runs the merge while staying logged into her own Google account but the recipients will see her boss’s email as the sender.

Both these scenarios can be easily handled in Mail Merge and Document Studio by setting up aliases in Gmail.

You can even send emails from your Outlook, Yahoo or Zoho email addresses through aliases in Gmail. Students and teach can send emails from their @school.edu email address while logged into their personal email accounts.

How to Setup Email Aliases in Gmail

Open gmail.com on your desktop computer, go to Settings, click the Accounts tab and, under the “Send mail as” section, click the link that says “Add another email address.”

Gmail Add Email Address

Next, follow the wizard to add the other email address as an alias to your current email address. You need to specify the sender’s name, the email address on behalf of which you wish to send out th emails and the reply-to address (optional).

Gmail Alias Setting

Treat as an alias - Yes or No?

If you own both email accounts, check the “treat as alias” option and emails sent to either address will arrive in the same Gmail inbox.

If you are sending emails on behalf on another person, say a secretary sending emails on behalf of his or her boss, the option should be unchecked. When the recipient replies to messages you send from the alias, the To: field in their reply message will be filled with your alias email address.

Gmail Verification

Gmail will send a verification code to your other email address that you wish to add as an alias to verify whether you really own or have access to that email account.

Verification Email Link

Log in to your other Gmail account and open confirmation email. Copy the confirmation code and paste it into alias verification box. Your other email address will now be added as an alias to your primary email address.

Change the Email Sender

This is how you can send emails from a different address in Google Sheets.

Mail Merge for Gmail

Send Email from Alias

Open your Google Sheet, choose Addons > Mail Merge with Attachments > Configure to open the merge sidebar. Expand the “Sender’s Email” dropdown and it will have a list of all email aliases that are connected to your Gmail account.

You can now send personalized emails on behalf of any email address that you own or have verified as an alias.

Document Studio

Open Google Sheet, go to Add-ons > Document Studio > Open. Expand the Mail Merge section and click on edit to open the Email Template designer. You’ll have an option to change the email sender as shown in the screenshot below:

Change Email Sender

Error - Cannot Add Aliases in Gmail

Are you getting an error while adding an alias in Gmail?

You must send through gmail.com SMTP servers you can send as abc@work.com. However, this functionality is not available for your account. Please contact your domain administrator.

If you do not see an option to add aliases in your Gmail settings, it is likely because your Google Workspace (GSuite) domain administrator has disabled the option to send email from aliases in domain settings.

To enable email sender aliases in Google Works, ask the admin to:

  1. Sign into the Google Admin console admin.google.com.
  2. From the dashboard, go to Apps > GSuite > Gmail > End User Access.
  3. Turn on the “Allow per-user outbound gateways” setting that says “Allow users to send mail through an external SMTP server when configuring a “from” address hosted outside your email domains.”

Save the settings and wait for about 30-60 minutes for the changes to propagate. You’ll then be able to added external email addresses as aliases in your Google Workspace email account.

Google Workspace Email Setting Send from a different email address in Google Workspace

How to Use a Different Reply-to Address in Gmail

With Document Studio, you can specify a different reply-to email address for outgoing email message. When the recipient hits the “Reply” or “Reply All” button, the To field in their email reply gets populated with the email address that you’ve specified as the Reply-to email at the time of sending.

You can even specify more than one email addresses in the reply-to field, separated by commas, and they will all show up in the To field of the reply field.

The reply-to addresses can also be dynamic and can be based on data in your Google Sheets and Google Forms. For instance, if you have a question in your Google Form that asks the form respondent’s email address, that email can be set as the reply-to address.

Thus, when you reply to the email message, the reply will automatically go to the form respondent’s inbox.

Reply-to Email Address for Gmail

To get started, open your Google sheet, go to the add-ons menu and choose Document Studio. Next click on the Open menu to open the Document Studio sidebar. Expand the Mail Merge section and click on visual email editor.

Reply-to email address

This opens the visual email template designer. Specify the address(es) in the Reply-to addresses field as shown in the screenshot.

If you are specifying a dynamic field, enclose the question title (or the column header) inside double curly braces like {{Email Address}}.

Troubleshooting: Gmail may not always send replies to the email address specified in the reply-to field. See solution - Gmail ignores reply-to setting.

How to Track Unsubscribes with Mail Merge for Gmail

Mail Merge for Gmail gives you can easy option to add an “Unsubscribe” link to all your outgoing email campaigns. When an email recipient clicks the unsubscribe link, the status of their email address is set to UNSUBSCRIBED and you will not able to send email campaigns to unsubscribed users in your future mail merge campaigns.

You can also manually resubscribe any unsubscribed contact if they have unsubscribed from your campaigns by accident.

Inside your Google Sheet, go to Addons > Mail Merge with Attachments > Configure Mail Merge and expand the section that says “Enable Email Tracking”;

Provide a Campaign Name, check the option that says “Include an Unsubscribe Link” and also provide the text of the unsubscribe link.

Mail Merge Unsubscribe Link

How Unsubscribe Works in Mail Merge

When the unsubscribe option is checked, all outgoing emails sent through Gmail Mail merge will include a remove link in the message footer automatically.  The subscriber can click the link to opt-out of your future mailing lists.

When they click the unsubscribe link, they are taken to a special landing page confirming that their request for unsubscribing has been successfully recorded.

How to View Unsubscribed User Reports

Go to Add-ons > Mail Merge with Attachments > Campaign Reports > Open and Click Reports. This will open a list of email campaigns you’ve sent through Mail Merge. Click the Unsubscribe button in any specific campaign to generate a list of all email addresses that have unsubscribed from your mailing list via that particular campaign.

This will add a new “Unsubscribe Report” sheet in your Google Spreadsheet for Mail Merge. The report will include the following data to help you analyze the campaigns that resulted in the most unsubscribes:

  • Date when the message was sent to the user
  • Date when the user unsubscribed from the mailing list
  • Email address of the unsubscriber
  • Location / IP address from where the user unsubscribed
  • Web browser (or mobile browser) of the unsubscriber.

Here’s a sample unsubscribe report generated by Mail merge.

unsubscribe-report.png

How to Resubscribe an Unsubscribed Email Address in Mail Merge

The Mail Merge for Gmail app lets you include an unsubscribe link in your email message. If a user clicks the unsubscribe link to opt-out of your mailing lists, you’ll not be able send future email campaigns to that email address.

You can always send emails to the unsubscribed user manually via Gmail but they will not be included in the email campaigns sent via Mail Merge for Gmail.

Reactivate an Email Address

If your contact has unsubscribed their email address from your mailing list accidentally, or if you manually unsubscribed a user from your email system, you can easily reset their subscriber status from withing the Mail merge app. You’ll then be able to resume sending email campaigns to the resubscribed user via Mail Merge.

Resubscribe email addresses manually

Resubscribe Contacts in Mail Merge

Open your Google Sheet, go to the addons menu, select Mail Merge with Attachments, choose Email Campaign Reports and then choose Resubscribe Contacts.

On the next screen, type one or more email addresses that you wish to reactivate for Mail Merge. You can specify up to 4 different email addresses, and each email address should be specified in its own input box.

Click the Resubscribe button to reactivate the subcriber.

Reactive Email Address

How to Pitch Journalists and Bloggers with Mail Merge for Gmail

John is a public relations professional and he is often required you to send press releases and event invites to journalists, bloggers and influencers via email.

Reaching out to individual journalists can be slow so how do you send the same email to multiple people in one go? Some people use the BCC option in Gmail - compose a single email, put email addresses of all recipients in the BCC field and hit send.

That’s obviously the easiest option for sending bulk emails through Gmail but such generic email pitches are unlikely to get noticed.

Send Email Pitches with Gmail

In this tutorial, I’ll show you how you can use send personalised email pitches to your media contacts through Gmail and Google Sheets. You’ll be able to schedule your press releases in advance and also track which influencers have seen your emails.

The big advantage is that, unlike other mass email programs, messages sent via Mail merge are delivered just like regular emails directly in the Inbox.

Let’s get started:

How to use Mail Merge with Gmail

Go to the Google Workspace Marketplace and install the Gmail Mail Merge addon. You’ll need to grant certain permissions so that the add-on can send emails from your Gmail accounts. It also needs permission to attach files from your Google Drive.

Now that the add-on is installed, type sheets.new in your browser to create a new Google Sheet. Inside the sheet, go to the Addons menu, choose “Mail Merge with Attachments” and then select the “Create Merge Template” menu.

Mail merge with Google Sheets

Your sheet now has all the essential columns that are required for running mail merge but can add more columns. We’ll add Location and News Outlet columns as shown in the above screenshot.

The next task is to get the media list into this Google Sheet. You can either import groups from Google Contacts, from your Mailchimp campaigns or, if you are an Excel user, export as CSV and directly import the CSV file into Google Sheets.

Create an Email Template for Merge

Open your Gmail, create a new email message (see screenshot) and save the template in your drafts folder. The email can have {{markers}} enclosed in double curly braces and these are replaced with actual values from the Google Sheet in your outgoing emails.

When we enclose some text inside double curly braces, it becomes a marker and these are replaced with values in the sheet. You can also add emojis in the subject and body.

Next, we can add some attachments to our email template. You can either upload files from your computer or you can bring directly from your Google Drive.

Mail merge Email Template

Configure and Run Mail Merge

Now that our email template in Gmail is ready, go back to your Google Sheet and choose Configure mail merge from the Mail Merge menu under add-ons.menu.

Follow the step by step wizard to configure merge but there are a few important things you should know.

  1. You can send emails on behalf of any email address that is associated as an alias in your Gmail account. So an intern can send emails on behalf of the manager while logged into her own Google account.
  2. You can add a CC or BCC email address and all your merged emails will be copied to them as well. Remember that Gmail counts every CC or BCC recipient as a separate email and thus it counts towards your daily email quota.
  3. Mail Merge includes email tracking so you can know who opened your email or clicked the links. For email newsletters, you can even include an unsubscribe option in your email messages.

Configure Mail merge

After the configuration is done, go to the Send Email Section, select the Send a test email option and hit the Go button.

Mail Merge will take the merge data from the first row in the Google Sheet and send you a test email. You can find the test email in your Gmail Sent folder.

If you are satisfied with the test email, go back to the Google Sheet, select the Run Mail Merge option and hit Go to perform a live merge. That’s it.

The emails will be dispatched immediately and you can check the Mail Merge Status column in the sheet to track the sending progress.

You can add more rows in the Google Sheet to send the same email to another batch of people and when you hit send, Mail Merge will automatically ignore the rows that have already been sent the email.

Mail Merge - Tips and Tricks

  1. You can schedule emails - just add a date and time in the Scheduled Date column and run merge again to schedule the emails.
  2. If you have a lot of rows in the sheet, you can skip sending emails to specific rows by hiding those rows in the Google Sheet. Alternatively, you may use filters in Google Sheets to only show rows that match certain criteria. When you run merge again, emails will be sent to visible rows only.
  3. If you wish to cancel scheduled emails, you can either empty the scheduled date column or you can go to the Mail Merge menu, choose Help and click the Cancel Scheduled Mail option.
  4. With Mail merge you can also send different attachments to different people. See how-to guide.
  5. You can also create drafts with Mail Merge and this is a handy option if you wish to review the emails manually before sending them to real people.
Get Gmail Mail Merge

How to CC or BCC Multiple Email Recipients with Gmail Merge

Let’s say you are sending out a personalized mass email using Mail Merge for Gmail but would still like to add certain recipients in the CC or BCC list.

If you would like to include the same recipient in the CC or BCC field for all merged email, go to the Add-ons menu in your Google Spreadsheet, choose Mail Merge with Attachments, Configure and put the emails in the CC or BCC input box as shown in the following screenshot.

cc-bcc-merge.png

How to CC / BCC Different People in Mail Merge

If you would like to use different CC or BCC email addresses for each recipient of Merge, here’s how to do it.

Open your Mail Merge sheet and create two additional columns. Set the header title of these columns as CC and BCC respectively. Now you can include one or more email addresses under these columns and they’ll be CCed or BCCed automatically during the merge.

bcc-merge.png Create new columns, CC & BCC, and include one or more emails (comma separated)

CC / BCC - Things to Know

Please note that Gmail counts every CC or BCC as a separate email and thus they would be counted against your mail merge quota. If you send 2 emails and each email has 1 recipient in the CC box, your effective merge quota will be reduced by 4 (2 + 2).

Also, it is not required to include yourself in the BCC list since mail merge stores all sent emails in your Gmail Sent items folder.