Skip to main content

Ouauth2 outlook email backend for Django

Project description

Django outlook email backend

Outlook api email backend for Django

First steps

Retrieve the client id, client secret and tenant id from the Azure portal. Follow this documentation: https://learn.microsoft.com/en-us/azure/api-management/authentication-authorization-overview Add the Mail.send permision to the app in the Azure portal.

Requirements

  • Python 3.8+
  • Django 5.0, 4.2

Installation

Install using pip...

pip install django-outlook-email-backend

Add 'OUTLOOK_CREDENTIALS' in settings.py

OUTLOOK_CREDENTIALS = {
    'OUTLOOK_CLIENT_ID': "XXXXX",
    'OUTLOOK_CLIENT_SECRET': "XXXXX",
    'OUTLOOK_TENANT_ID': "XXXXX",
}

Add 'EMAIL_BACKEND' in settings.py

EMAIL_BACKEND = "django_outlook_email.django_outlook_email_backend.OutlookEmailBackend"

if you want to use json instead of mime add the following line in settings.py

OUTLOOK_CREDENTIALS["OUTLOOK_SEND_FORMAT"] = "json"

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_outlook_email_backend-1.1.16.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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