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.
- Docker Registry @ giggio/bulkmail
- GitHub @ giggio/bulkmail
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 yourusername@gmail.com smtp.gmail.com:465 -u yourusername@gmail.com -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 yourusername@gmail.com smtp.gmail.com:465 -p 'your password in here'
Or, in Docker:
docker run --rm -ti -v /path/to/files/:/data giggio/bulkmail # arguments
The csv file has to have a header, and at least one column titled email_address
.
See an example of a input file here.
We are using Handlebars to render the message body. You can see an example that works with the above csv file here.
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
.
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.
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.
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.
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.
Licensed under the MIT license.