Skip to main content

GSuite Email Backend

Downloads GitHub release (latest by date) GitHub issues Documentation Status

This package allows to use Django's send_mail command to send emails through GSuite account.

It requires a serviceaccount credential created in Google coud console, The crendential file need to have https://www.googleapis.com/auth/gmail.send scope.

Follow this tutorial to create the credentials file, make sure to add https://www.googleapis.com/auth/gmail.send scope.

Installation

pip install django-gsuite-email

Quick start

1. Add it to installed apps in setings.py

INSTALLED_APPS = [
    ...
    'django_gsuite_email',
    ...
]

2. Set the Email EMAIL_BACKEND setting

EMAIL_BACKEND = 'django_gsuite_email.GSuiteEmailBackend'

3. Set location of credentials file.

To do this, either set GSUITE_CREDENTIALS_FILE environment variable.
OR
set GSUITE_CREDENTIALS_FILE in settings.py

GSUITE_CREDENTIALS_FILE="/path/to/credentials/file.json"

Note: GSUITE_CREDENTIALS_FILE in settings.py will take precedence over environment variable.

4. Send emails

from django.core.mail import send_mail

send_mail(
    'Subject here',
    'Here is the message.',
    'from@example.com',
    ['to@example.com'],
    fail_silently=False,
)

Metadata

Release files for django-gsuite-email 0.1.2

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-gsuite-email 0.1.2
File Size Uploaded Provenance Actions
django-gsuite-email-0.1.2.tar.gz 5.4 kB Without provenance Details for django-gsuite-email-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-gsuite-email 0.1.2
File Interpreter ABI Platform Actions
django_gsuite_email-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for django_gsuite_email-0.1.2-py2.py3-none-any.whl

Total release size: 11.5 kB

Release files / django-gsuite-email-0.1.2.tar.gz

Download URL django-gsuite-email-0.1.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b5a65eca01443afec01c4574c0b066a0e0118eaebb2149a3043a72106ea3fde0
BLAKE2b-256 checksum
How to use checksums
28d83b20a2b8f2e190b97fb4871b5ca7bf8d209b02f186baca960f169ce4f0aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.7

Release files / django_gsuite_email-0.1.2-py2.py3-none-any.whl

Download URL django_gsuite_email-0.1.2-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9e36793926210f7f72a40b157f404974d44ee23f6ef6972ef720aa1d3bb788ad
BLAKE2b-256 checksum
How to use checksums
83a509e619529329d3938708e344ab83da74fb6f0158374cc5e21cc15deb885e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.7

Security for django-gsuite-email 0.1.2

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.

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