Skip to main content

Use an URL to configure email backend settings in your Django Application.

Project description

This utiliy is based on dj-database-url by Kenneth Reitz.

It allows to utilize the 12factor inspired environments variable to configure the email backend in a Django application.


Configure your email configuration values in from EMAIL_URL:

email_config = dj_email_url.config()

Parse an arbitrary email URL:

email_config = dj_email_url.parse('smtp://...')

After this, it is necessary to assign values to settings:

EMAIL_HOST = email_config['EMAIL_HOST']
EMAIL_PORT = email_config['EMAIL_PORT']

Supported backends

Currently, it supports:

  • SMTP backend (smtp or smtps),

  • console backend (console),

  • file backend (file),

  • in-memory backend (memory),

  • and dummy backend (dummy).

The scheme smtps indicates to use TLS connections, that is to set EMAIL_USE_TLS to True.

The file backend is the only one which needs a path. The url path is store in EMAIL_FILE_PATH key.

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

dj-email-url-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

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