Add a management command send_test_email to verify the transactional email pipeline is working end-to-end in any environment.
Motivation
There's no easy way to confirm that email sending actually works in a given environment (staging, production) without triggering a real user action like registration. A dedicated command makes smoke-testing the email config fast and safe.
Behaviour
python manage.py send_test_email <recipient>
- Sends a simple "test email" to the given address using whatever email backend is configured (
EMAIL_BACKEND, EMAIL_HOST, etc.)
- Prints the outcome to stdout: success with delivery details, or a clear error message on failure
- Should go through the same code path as real transactional emails (i.e. not bypass Celery if email sending is async)
Acceptance criteria
Parent
Part of #426
Add a management command
send_test_emailto verify the transactional email pipeline is working end-to-end in any environment.Motivation
There's no easy way to confirm that email sending actually works in a given environment (staging, production) without triggering a real user action like registration. A dedicated command makes smoke-testing the email config fast and safe.
Behaviour
EMAIL_BACKEND,EMAIL_HOST, etc.)Acceptance criteria
users/management/commands/send_test_email.py(orapi/if more appropriate)docker compose run --rm web python manage.py send_test_email test@example.comParent
Part of #426