Bulkmail
This app reads a csv file and sends an email with a formatted Handlebars file.
This can be run on Linux for AMD64 and ARMv7.
Upstream Links
- Docker Registry @ giggio/bulkmail
- GitHub @ giggio/bulkmail
Quick Start
You need to mount a volume somewhere, and the files will be read/writen there. Run it like this (example for Gmail):
bulkmail send /path/to/input.csv "Subject here" /path/to/template.handlebars [email protected] smtp.gmail.com:465 -u [email protected] -p 'your password in here'
If the e-mail address is the same as the user you can omit it.
bulkmail send /path/to/input.csv "Subject here" /path/to/template.handlebars [email protected] smtp.gmail.com:465 -p 'your password in here'
Or, in Docker:
docker run --rm -ti -v /path/to/files/:/data giggio/bulkmail # arguments
Csv file details
The csv file has to have a header, and at least one column titled email_address
. See an example of a input file here.
Template file details
We are using Handlebars to render the message body. You can see an example that works with the above csv file here.
Detailed commands
There are two commands: send
and write
. The former sends the message, the latter writes a text file with the outputs and sends nothing.
All commands have a -v
option for verbose output, and you can get help by running docker run --rm giggio/bulkmail --help
.
Sending bulk e-mails
To view available args run:
docker run --rm giggio/bulkmail send --help
This command has a simulated argument, which will make it not send the e-mail but write to stdout instead.
Writing e-mails to a file
To view available args run:
docker run --rm giggio/bulkmail write --help
This command has a simulated argument, which will not read or write from/to any files, instead it will read from an in-memory csv and write to stdout.
E-mail options
Commands that send e-mail will do so using SMTP. You have to supply the values like server, port, sender and destination e-mail addresses etc. Authentication information is optional, but most mail servers will require it.
Contributing
Questions, comments, bug reports, and pull requests are all welcome. Submit them at the project on GitHub.
Bug reports that include steps-to-reproduce (including code) are the best. Even better, make them in the form of pull requests.
Author
License
Licensed under the MIT license.