Skip to main content

Microsoft Graph Email Backend for Django

An email backend for Django that uses Microsoft Graph to send and receive emails. It uses the msal library to retrieve an access token with Microsoft Graph and then uses the Microsoft Graph API to send and receive emails.

Similar to django-msgraphbackend but with less options and an implementation using the Microsoft Authentication Library (MSAL).

Installation

To include it in your Django project, add it to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    ...
    'msgraph_email',
]
# or 
INSTALLED_APPS = INSTALLED_APPS + ('msgraph_email',)

Then add the following to your settings.py file:

EMAIL_BACKEND = 'msgraph_email.MicrosoftGraphEmailBackend'
GRAPH_API_CREDENTIALS = {
    'client_id': 'your-client-id',
    'client_secret': 'your-client-secret',
    'tenant_id': 'your-tenant-id',
    'mail_from': 'your-email@your-domain.com' # to use Django's default email address, set this to os.getenv('DEFAULT_FROM_EMAIL')
}

Metadata

Release files for django-msgraph-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)

Source distribution for django-msgraph-email 1.0.0
File Size Uploaded Provenance Actions
django_msgraph_email-1.0.0.tar.gz 4.5 kB With provenance Details for django_msgraph_email-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-msgraph-email 1.0.0
File Interpreter ABI Platform Actions
django_msgraph_email-1.0.0-py3-none-any.whl Python 3 none any Details for django_msgraph_email-1.0.0-py3-none-any.whl

Total release size: 10.0 kB

Release files / django_msgraph_email-1.0.0.tar.gz

Download URL django_msgraph_email-1.0.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7b4b1da3b73f0e320e09e74d8858b178d8ebff5557eca7aeaae0ee28cbe66ec9
BLAKE2b-256 checksum
How to use checksums
374d742f9bd5b5124a3e25fd78326928a6ff592092740a37270162123d18360c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2025.

Transparency log

Release files / django_msgraph_email-1.0.0-py3-none-any.whl

Download URL django_msgraph_email-1.0.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
548e7a620f0072161820f34858e75424ef26d061bd1f84b1a91f66d57174e650
BLAKE2b-256 checksum
How to use checksums
e9d01bfbc1d35024f8bfc66e79d82d9d256bc550e761e35085a8cbeceebc1957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2025.

Transparency log

Security for django-msgraph-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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_msgraph_email-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2025.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page