Django Better Azure Communication Email
This is a fork from: https://github.com/retech-us/django-azure-communication-email
A Django email backend for Azure Communication Email service.
Installation
Run the following on your system:
pip install django-better-azure-communication-email
Then, add these settings to your Django settings.py:
EMAIL_BACKEND = 'django_better_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_better_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.
Using MAILERS (Django 6.1+)
Django 6.1 introduced the MAILERS
setting, which deprecates EMAIL_BACKEND. Both are supported. With MAILERS,
the backend can be configured through OPTIONS:
MAILERS = {
"default": {
"BACKEND": "django_better_azure_communication_email.EmailBackend",
"OPTIONS": {
"connection_string": "...",
},
},
}
Available OPTIONS (each one falls back to the matching setting when not
given):
| Option | Fallback setting |
|---|---|
connection_string |
AZURE_COMMUNICATION_CONNECTION_STRING |
endpoint |
AZURE_COMMUNICATION_ENDPOINT |
key_credential |
AZURE_KEY_CREDENTIAL |
tenant_id |
AZURE_TENANT_ID |
client_id |
AZURE_CLIENT_ID |
client_secret |
AZURE_CLIENT_SECRET |
tracking_disabled |
AZURE_COMMUNICATION_TRACKING_DISABLED |
fail_silently |
(defaults to False) |
Note: Django does not allow the fail_silently argument together with
using (e.g. send_mail(..., using="default", fail_silently=True) raises a
TypeError). If you need a mailer that fails silently, set
"fail_silently": True in its OPTIONS instead.
Metadata
Release files for django-better-azure-communication-email 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_better_azure_communication_email-1.0.0.tar.gz | 9.5 kB | Without provenance | Details for django_better_azure_communication_email-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_better_azure_communication_email-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for django_better_azure_communication_email-1.0.0-py3-none-any.whl |
Total release size: 21.0 kB
Release files / django_better_azure_communication_email-1.0.0.tar.gz
| Download URL | django_better_azure_communication_email-1.0.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28fb4c8bd5e05497e7f5cf79b548e055797895802b0767478d2b9c179329921a
|
|
BLAKE2b-256 checksum How to use checksums |
7ed3077682bfa1339823304d5751e18624594b442de8b0bc7d7690caca8146c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure
|
Release files / django_better_azure_communication_email-1.0.0-py3-none-any.whl
| Download URL | django_better_azure_communication_email-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37996764a8a905d15289d62b8dad4155060dd0eb53bfaeb2dfb2a4716d70dfd4
|
|
BLAKE2b-256 checksum How to use checksums |
463300b96e6a0810cd23d0646584b158212d33a107a18e05a01af3d59fad763e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure
|
Security for django-better-azure-communication-email 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.