Skip to main content

A Microsoft Graph Email Backend for Django using msal.

Project description

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')
}

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

django_msgraph_email-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_msgraph_email-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file django_msgraph_email-1.0.0.tar.gz.

File metadata

  • Download URL: django_msgraph_email-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for django_msgraph_email-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7b4b1da3b73f0e320e09e74d8858b178d8ebff5557eca7aeaae0ee28cbe66ec9
MD5 bfcc42c6ce047553faac643e2359d1e9
BLAKE2b-256 374d742f9bd5b5124a3e25fd78326928a6ff592092740a37270162123d18360c

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_msgraph_email-1.0.0.tar.gz:

Publisher: ci.yml on PacificCommunity/django-msgraph_email

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_msgraph_email-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_msgraph_email-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 548e7a620f0072161820f34858e75424ef26d061bd1f84b1a91f66d57174e650
MD5 f4d8debad5ed81c116d506a73e15d44d
BLAKE2b-256 e9d01bfbc1d35024f8bfc66e79d82d9d256bc550e761e35085a8cbeceebc1957

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_msgraph_email-1.0.0-py3-none-any.whl:

Publisher: ci.yml on PacificCommunity/django-msgraph_email

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page