Metadata-Version: 2.1
Name: django-azure-communication-email
Version: 1.2.0
Summary: A Django email backend for Azure Communication Email service.
Home-page: https://github.com/retech-us/django-azure-communication-email
License: Apache-2.0
Keywords: django,email,azure
Author: Dmitrii Azarenko
Author-email: dmitrii.azarenko@symphonyai.com
Requires-Python: >=3.8,<3.13
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.2
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.0
Classifier: Framework :: Django :: 4.1
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: Django (>=2.2,<5.2)
Requires-Dist: azure-communication-email (>=1.0,<1.1)
Requires-Dist: azure-identity (>=1.15,<1.18)
Project-URL: Bug Tracker, https://github.com/retech-us/django-azure-communication-email/issues
Project-URL: Company Website, https://retechlabs.com
Project-URL: Repository, https://github.com/retech-us/django-azure-communication-email
Description-Content-Type: text/markdown

# Django Azure Communication Email

[![Unit tests](https://github.com/rebotics/django-azure-communication-email/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/rebotics/django-azure-communication-email/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/django-azure-communication-email.svg)](https://badge.fury.io/py/django-azure-communication-email)
[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://img.shields.io/badge/python-3.8+-blue)
[![Django](https://img.shields.io/badge/django-2.2+-blue.svg)](https://img.shields.io/badge/django-2.2+-blue)

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](https://python-poetry.org/docs/cli/#version).
  This will update the version in `pyproject.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).

