A tool to interact with MailGun's API to handle suppressions.
Takes an email address as an input, checks to see if the address appears on these lists:
- unsubscribes
- complaints
- bounces
If the address appears, it will then be removed from each list.
git clone https://github.com/miketheman/unsilencer.git
cd unsilencer/
pipenv install
# Alternately, if you want to develop the code:
pipenv install --dev
Set environment variables:
MAILGUN_API_KEY
- see docs. Looks like:key-<hash>
MAILGUN_DOMAIN_NAME
- the domain owning the suppression lists being checked
Once installed and configured, execute via pipenv
:
pipenv run python unsilencer.py [email protected]
Alternately, enter Pipenv's environment and execute:
pipenv shell
python unsilencer.py [email protected]
Uses pytest test suite, with a bunch of plugins to help with code quality.
Execute tests:
pipenv run pytest
Read a blog from PyBites if you're unfamiliar with pytest!
Testing the tests can be executed via:
pipenv run mutmut run
Read more about mutmut!