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
Close
Hashes for django_azure_communication_email-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb1d7daa03e8a83c58e50e4644a404c1d358998a578f1f26eab52f1cc139916 |
|
MD5 | 96603c34249a9c3d6e64511cd7728e2e |
|
BLAKE2b-256 | 450524141ef702b41afdaf1bb55aab056ecb3722007f728f11c1bd57ea9e743a |
Close
Hashes for django_azure_communication_email-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65bff9cc979faeceec7810836d9c25767789c2a9222d9941512dabd4cbb974a |
|
MD5 | b9d92a7744647303eec7a412c2392b6e |
|
BLAKE2b-256 | 6ea32865e4b752d8ff49ba9466feb49cd76a912fd55841e7170ab37b7648dc86 |