Skip to main content

Django email backend using Huey

Project description

A simple Django email backend which uses Huey.

Usage

Add the app to your settings:

# settings.py

INSTALLED_APPS = [
    ...
    "huey.contrib.djhuey",
    "hueymail",
    ...
]

and use it as your email backend:

# settings.py

EMAIL_BACKEND = 'hueymail.backends.EmailBackend'

Last, choose which email backend Huey should dispatch to via the HUEY_BACKEND setting:

# settings.py

HUEY_BACKEND = "django.core.mail.backends.smtp.EmailBackend"

How it works

What happens when you send an email? Basically this:

  • Django creates a new instance of hueymail.backends.EmailBackend, and calls its send_messages() method with the email messages it wants to send.

  • The send_messages() method of the hueymail.backends.EmailBackend instance dispatches a Huey task called dispatch_messages(), which is responsible for sending those messages.

  • The dispatch_messages() task creates an instance of HUEY_EMAIL_BACKEND and calls its send_messages() method with the original email messages.

License

Copyright (c) 2022 Christopher McDonald

Distributed under the terms of the MIT license.

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-huey-email-backend-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-huey-email-backend-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-huey-email-backend-0.1.0.tar.gz
Algorithm Hash digest
SHA256 012ae1ac0d6e0a0fe400dbf802a6bf2964c3df9fd982353081f321406fa3ea43
MD5 b8bbb0a601575d4f501ae56c55e18ecb
BLAKE2b-256 a107d1a372768d5e5c84feb4baff65c090a8ff2d8f0db992f363f71e6580b0af

See more details on using hashes here.

File details

Details for the file django_huey_email_backend-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_huey_email_backend-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02fc81ab035fc1202f66b2bac9f079d2acfbb77b42a6902484a2d97067035116
MD5 6b342a65b92ada00e409270d0458a76b
BLAKE2b-256 4fdc72d5f33e2c48b33f2724b247cbaebb78afed01d972db9eae21cc01333ca1

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