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
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
File details
Details for the file django_azure_communication_email-1.2.1.tar.gz
.
File metadata
- Download URL: django_azure_communication_email-1.2.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9b684e6726d27ddbe29c78971813beaed513607e7e3c8118c28f818f28e94e7 |
|
MD5 | 3ee17f5b98bd14c238bc0451d43811cb |
|
BLAKE2b-256 | a4a61b47302bb1830eac0afccdfff1c4fe426d98e176db2736dcb2a9204a479f |
File details
Details for the file django_azure_communication_email-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: django_azure_communication_email-1.2.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c6fe008f2108ed4aa609c0e084dea39238830480489c80823ca83b4dae24fe |
|
MD5 | 34088cb54c1688c64406bdc1618c83d6 |
|
BLAKE2b-256 | 7e4f7fa6aaa7e340222a8c71245a8c7514ec0ea7e7108bdd5a50130516d7b060 |