Skip to main content

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.

Usage

Configure your email configuration values in settings.py 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_FILE_PATH = email_config['EMAIL_FILE_PATH']
EMAIL_HOST_USER = email_config['EMAIL_HOST_USER']
EMAIL_HOST_PASSWORD = email_config['EMAIL_HOST_PASSWORD']
EMAIL_HOST = email_config['EMAIL_HOST']
EMAIL_PORT = email_config['EMAIL_PORT']
EMAIL_BACKEND = email_config['EMAIL_BACKEND']

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.

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 details)

Uploaded Source

File details

Details for the file dj-email-url-0.0.1.tar.gz.

File metadata

  • Download URL: dj-email-url-0.0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dj-email-url-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8444db73d93e1c6d406d8e8e7251493f0d690b572f6e7060acff549bf5f087d6
MD5 e632209bf2580dbcf0e34c075b773a4a
BLAKE2b-256 94697c937491c7a85007d32ecca5126856e3637a8424f25623b6070d2772f5de

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

1 file

This release

0.0.1 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page