This is a software to make the task of sending bulk emails to a list of contacts easier.
$ pip install mailipy
In order to send emails, you need to first generate them and later send them.
You need to prepare a template.md file which must have a YAML front matter
(similarly to what you find in
Jekyll). See the example for the
keywords required in the front matter.
The command to create the emails is the following:
$ mailipy-gen template.md contacts.csv
This will create as many emails as there are records in contacts.csv. The
emails will be stored in outbox/ by default. You can use a third parameter to
change the outbox destination folder.
Once you created the emails, run the following command (changing the outbox directory accordingly):
$ mailipy-send mail.example.com:528 my_username outbox
The command will inform you of how many emails are going to be sent, and then will prompt you for a password.
You can make changes to the gen.py and
send.py scripts, and test these changes by running a
local version of Mailipy. After testing your changes, you can open a pull
request.
- Make sure you have poetry installed in your system.
- Run
poetry installfollowed bypoetry shellfrom the root of the source directory. - Now you can run
mailipy-genandmailipy-send, and these will include your local changes. You can verify that you're running a different binary than the globally installed one by runningwhich mailipy-gen: the command will return the full path of the binary you're using.
After installing with poetry install and entering the poetry shell, run the
following:
$ pytest
The command will search recursively for files named *_test.py and run them.
See the pytest documentation.
