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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b8c829e5d090e652769a9ea6f3d34be27c4a76f71326ea472db912e14f95e2 |
|
MD5 | bc118b0d24f5a95a060a0c6a5e7a9e83 |
|
BLAKE2b-256 | 6581fea90b2c89691c2b15e4493b591e21db8294227157fc8259a0f74ef780e8 |
Close
Hashes for django_azure_communication_email-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6154a561e6d9c85b0ccb1db05f93fb456582b284bdee5f594c29547411ca9d3 |
|
MD5 | 3f27f367bbe0c166f106a0f056dc2fbd |
|
BLAKE2b-256 | 39815962ab94a5130ad57ecd46db6f0bf36a135fe84e3e4138d6bf0eac83306b |