This is a plugin for django-health-check, which check that your app can send emails through the email backend configured in your Django settings.
Install with pip in your environment:
pip install django-health-check django-health-check-email
Add the app to your INSTALLED_APPS
:
INSTALLED_APPS = [
# ...
'health_check', # required
# ...
'health_check_email',
]
Apply migrations:
python manage.py migrate
Add your settings to HEALTH_CHECK
:
HEALTH_CHECK = {
"EMAIL_ENABLED": True,
"EMAIL_IS_CRITICAL": True,
"EMAIL_SUBJECT": "my email health check",
"EMAIL_MESSAGE": "my message",
"EMAIL_FROM": "[email protected]",
"EMAIL_TO": ["[email protected]", "[email protected]"],
}