Send batch emails from the command line, powered by Mailgun batches.
Just clone the repo.
- Create and configure
.env.jsonwith your Mailgun API key (Copy.example.env.jsonand customize) - Create a
datadirectory in project root
- In
./data, add:
- A CSV file
emails.csvcontaining the columnsfirstName,lastName,email - Plaintext email:
template.txt - HTML email:
template.html
npm run send
All emails will be sent!
💡 You can test without sending real email by engaging Mailgun test mode: Set the env var
MAILGUN_ENABLE_TEST_MODEtotrue
📝 I recommend the phenomenal MJML.app for designing and creating HTML emails.