Skip to main content

Django email backend for storing messages to a database.

Project description

Django DB Email Backend

Initially, Django email backend for storing messages to a database. This is intended to be used in developement in cases where you want to test sending emails, but don’t want to send real emails and don’t have access to the console output (such as on a remote server).

As this KUWAITNET fork, package has been updated and introduced SMTPDBEmailBackend which is a mixture between SMTP and DB mail backend, it writes to the database then send the email over smtp, if any errors happen while sending it is reflected in the email model. Also Package is now production ready.

Access to Email message content is allowed only for superusers for security concerns.

To install:

pip install django-db-email-backend

In settings.py:

INSTALLED_APPS += ['db_email_backend']
EMAIL_BACKEND = 'db_email_backend.backend.DBEmailBackend'
# or for live
# EMAIL_BACKEND = 'db_email_backend.backend.SMTPDBEmailBackend'

Configuration

SMTP_EMAIL_FILTER_FUNCTION_PATH default to db_email_backend.utils.smtp_filter_email_function. a dotted path to the smtp email filter function. A filter function for the smtp email, takes the email_message as a parameter, and return Boolean. Case it returns False, then the backend won’t send this message via smtp. You can use it to disallow SMTP sending for certain email based to their properties.

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

kn-django-db-email-backend-0.5.2.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file kn-django-db-email-backend-0.5.2.tar.gz.

File metadata

File hashes

Hashes for kn-django-db-email-backend-0.5.2.tar.gz
Algorithm Hash digest
SHA256 229ee540ad83b69ce48ae79b59486ee2eb54bef8334dbf7b66be9e1565b84726
MD5 56c015e332ddcd7975a7cf6bd993599b
BLAKE2b-256 232e27277c9b20ff4f8c5d345eacab66313f9ea3566fa9c3d1daaf9fe5d433dd

See more details on using hashes here.

Supported by

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