Skip to content

Instantly share code, notes, and snippets.

@mb8z
Created March 3, 2021 17:25
Show Gist options
  • Save mb8z/9ad3140d6d59eed40f80f8062fa2494b to your computer and use it in GitHub Desktop.
Save mb8z/9ad3140d6d59eed40f80f8062fa2494b to your computer and use it in GitHub Desktop.
Sending an email to multiple recipients
const { Emails } = require('automagically');
const send = async () => {
const email = Emails.send({
from: { email: '[email protected]', name: 'AwesomeApp' },
to: [
{ email: '[email protected]', name: 'John Doe', age: 30 },
{ email: '[email protected]', name: 'Foo Bar', age: 20 },
],
template: 'my-sendgrid-template-id-here',
});
};
send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment