A Django email backend for Azure Communication Email service.
Project description
Django Azure Communication Email
A Django email backend for Azure Communication Email service.
Installation
Run the following on your system:
pip install django-azure-communication-email
Then, add these settings to your Django settings.py
:
EMAIL_BACKEND = 'django_azure_communication_email.EmailBackend'
AZURE_COMMUNICATION_CONNECTION_STRING = '...'
# OR
AZURE_KEY_CREDENTIAL = '...'
AZURE_COMMUNICATION_ENDPOINT = '...'
If you prefer to use Azure Active Directory authentication, you can use the
following settings.py
instead:
EMAIL_BACKEND = 'django_azure_communication_email.EmailBackend'
AZURE_COMMUNICATION_ENDPOINT = '...'
# Note: make sure to set the following environment variables:
# AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET
Now, when you use django.core.mail.send_mail
, Azure Communication Email
service will send the messages by default.
Running Tests
To run the tests::
python runtests.py
If you want to debug the tests, just add this file as a python script to your IDE run configuration.
Creating a Release
To create a release:
- Run
poetry version {patch|minor|major}
as explained in the docs. This will update the version inpyproject.toml
. - Commit that change and use git to tag that commit with a version that matches the pattern
v*.*.*
. - Push the tag and the commit (note some IDEs don't push tags by default).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_azure_communication_email-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1df76eb61e9de2fd737b413fbc86d286284e4e2b1d9577a003f4d21475c75c42 |
|
MD5 | 49388710e3602d94257a354fc60fcd1a |
|
BLAKE2b-256 | 4097b9113b4faec6424772a87f3d8404418ba86d19731eb8b6a8523492af19fe |
Close
Hashes for django_azure_communication_email-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33f4f4e4ec8d38b383e1f8c222334ef7d56a98430e1cc9eddda6b836b4ca4899 |
|
MD5 | 239842d7cf97b89cd70713be251d5ba9 |
|
BLAKE2b-256 | fdc9825c0d4c4ef9ad02471fec442f896a2a04833216c1c4cf7b017f4ed47373 |