skip to navigation
skip to content

django-email-bandit 1.0

django-email-bandit is a Django email backend for hijacking email sending in a test environment.

Latest Version: 1.5

Build Status


A Django email backend for hijacking email sending in a staging/test environment. It extends the default SMTP backend to intercept outgoing emails and instead send them to a single email address that you specify. It does not intercept emails going to the site admins (as defined by the ADMINS setting) so it will not interfere with 500 error emails.

You can also configure the hijacked emails to be logged through standard Python logging. Mixin classes are provided to use the same hijack logic for any existing email backend such as django-ses.


  • Python 2.6, 2.7 or 3.2+ (Python 3 support required Django >= 1.5)
  • Django >= 1.3


To install django-email-bandit via pip:

pip install django-email-bandit

Add django-email-bandit to your installed apps:


For your test environment you should enable the backend:

EMAIL_BACKEND = 'bandit.backends.smtp.HijackSMTPBackend'

and set the email which will receive all of the emails:



Full project documentation is on Read the Docs.

Questions or Issues?

If you have questions, issues or requests for improvements please let us know on Github.

Development sponsored by Caktus Consulting Group, LLC.

File Type Py Version Uploaded on Size
django-email-bandit-1.0.tar.gz (md5) Source 2014-03-21 6KB