Skip to main content

A Django app to send email asynchronously

Project description

DjangoAsyncMail

DjangoAsyncMail is a Django app to send email asynchronously. This is a light-weight app using only Python threading for sending emails. It is meant for casual emails, like sending account activation mail from your website when account activation is optional.

Detailed documentation is in this post.

Quick start

  1. Add "DjangoAsyncMail" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'DjangoAsyncMail',
    ]
    
  2. Remember to add EMAIL_HOST_USER segment is your main Django project settings like this

    # SMTP Mail Settings
    EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
    EMAIL_HOST = 'smtp.yourdomainname.com'
    EMAIL_USE_TLS = False
    EMAIL_PORT = 587
    EMAIL_HOST_USER = 'noreply@yourdomainname.com'
    EMAIL_HOST_PASSWORD = 'your_email_password'
    DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
    
  3. Import and call the send_html_mail function with variables wherever you need like this

    from DjangoAsyncMail.mail import send_html_mail
    
    send_html_mail(subject,email_body,recipient_list,reply_to)
    
    Example:
    send_html_mail('Testing','Test HTML Content',['example@example.com'],['noreply@yourdomainname.com'])
    
  4. Check email delivery in Recipient's mailbox.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

DjangoAsyncMail-0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

DjangoAsyncMail-0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file DjangoAsyncMail-0.1.tar.gz.

File metadata

  • Download URL: DjangoAsyncMail-0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for DjangoAsyncMail-0.1.tar.gz
Algorithm Hash digest
SHA256 ab11b183865c96fb78229183bb96815497fec8b662a351cca5ae9cd4f3c1042e
MD5 c71b8907658f3c2e7742ad22266f3c47
BLAKE2b-256 799822deb2cf7edab9c6a44a459aa9035ac6f82bdda847f4b95555ac1f34d43a

See more details on using hashes here.

File details

Details for the file DjangoAsyncMail-0.1-py3-none-any.whl.

File metadata

  • Download URL: DjangoAsyncMail-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for DjangoAsyncMail-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9046e201a70e1e75e7a2ae32e639a3ce6ec4f137dc60f374a5f9dd7ae050e169
MD5 6c514dd88de88d007089e5a4544a845f
BLAKE2b-256 4e25c04181c1f20c113b9a02da630d974c23e19309d60d1377e1acfee585db14

See more details on using hashes here.

Supported by

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