a mail manager for sending mass personalized emails and newsletters
To see details on the different commands, type one of the following into the console:
python mailman.py -h
python mailman.py --help
The different commands available are deliver
and newsletter
.
The deliver command sends an email to a list of recipients replacing any replacer fields
(denoted by ${ATTR}
where ATTR
is an attribute name)
with matching attributes found in the recipient CSV list.
If any replacer fields remain after substitution into the template, an error will be thrown and the email will not be sent.
The deliver command usage is shown:
mailman.py deliver [-h] [-p --plaintext] subj CSV PT [HTML]
The parameters of the command are:
-h
or--help
provides documentation of the command in console-p
or--plaintext
sends the emails without an HTML alternative (therefore not requiring an HTML positional argument)- subj` sets the subject line of the email
CSV
is a filepath to the recipient list in a .csv formatPT
is a filepath to the plaintext template of the email in a .txt formatHTML
is a filepath to the HTML template of the email in a .html format (is required unless--plaintext
is active)
The newsletter command sends an email to a list of recipients. A data template given by a JSON file determines the content of the template.
The newsletter command usage is shown:
mailman.py newsletter [-h] CSV JSON
The parameters of the command are:
-h
or--help
provides documentation of the command in consoleCSV
is a filepath to the recipient list in a .csv formatJSON
is a filepath to the JSON file that contains the contents of the newsletter.