This small tool helps you to send newsletter through mailgun's API.
The main benefits of using a python script is the ability to create some automatic workflows.
- python >= 3.6
- requests
- PyYAML
- pandoc (only if you want to write newsletter in markdown format)
- R (only if you want to write newsletter in RMarkdown format)
- rmarkdown
Copy config_template.yml
to config.yml
(or whatever name you like), and modify it with your own configuration,
like api key, address, and subject line (optional).
Though only mailgun's API were tested, you can hack it to adapt other mail services.
Use your favorite editor/client to draft a newsletter, and convert it to a support file format.
Currently, postman
supports html, markdown (.md), and RMarkdown (.Rmd) files.
For example,
python3 post_letter.py \
-i INPUT_FILE_PATH \
-c config.yml \
-s "An interesting letter"