Skip to main content

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

Project description

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.

Requirements

  • Python 2.7 or 3.5+

  • Django >= 1.8 (supported versions)

Installation

To install django-email-bandit via pip:

pip install django-email-bandit

Add django-email-bandit to your installed apps:

INSTALLED_APPS = (
    ...
    'bandit',
    ...
)

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:

BANDIT_EMAIL = 'bandit@example.com'

Documentation

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-email-bandit-1.3.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

django_email_bandit-1.3-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-email-bandit-1.3.tar.gz.

File metadata

File hashes

Hashes for django-email-bandit-1.3.tar.gz
Algorithm Hash digest
SHA256 aad2049cf43eacfee99a3b0932d05d1aab885323a4e7866ae9c0fc844e98b43c
MD5 1d4abeaa0ed71e07dcc7148215f13f8f
BLAKE2b-256 c4efd2c841e1e47164075d2bc860e344b2593153ef42cad58d61b31db01f659c

See more details on using hashes here.

File details

Details for the file django_email_bandit-1.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_email_bandit-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fe43b8e0aab613048a5d801a1eb88f89bc8978e4885f86b923e174e36fbb8397
MD5 38994451cd76231ae73b2d7f294be3b5
BLAKE2b-256 7d45c432261adb649415de2a82712c79241a284ecd10f951a659d6d55a10d7de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page