Created
April 7, 2021 20:58
-
-
Save Frenchcooc/a2d12a7c663c6c432bb03ff3ea67b20d to your computer and use it in GitHub Desktop.
This gist is part of a blog post about mail merge script for Gmail - https://mailmeteor.com/mail-merge-gmail/script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendEmails() { | |
const recipients = ["[email protected]", "[email protected]"]; | |
const template = { | |
"subject": "My mail merge script for Gmail", | |
"content": `Hi,<br><br> | |
I just wanted to show you how to send emails in bulk with my Gmail account!<br><br> | |
Take care,<br> | |
- Corentin<br><br> | |
PS: <a href="https://mailmeteor.com/mail-merge-gmail/script">Click here to do it by yourself</a>` | |
} | |
recipients.forEach(function (recipient) { | |
MailApp.sendEmail({ | |
to: recipient, | |
subject: template.subject, | |
htmlBody: template.content | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment