
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
django-gmailapi-backend
Advanced tools
Email backend for Django which sends email via the Gmail API
The simple SMTP protocol is disabled by default for Gmail users, since this is included in the Less Secure Apps (LSA) category. The advice is to use SMTP+OAuth or to use the Gmail API directly. This package implements the second option as a Django email backend.
Install the package
pip install django-gmailapi-backend
In your settings.py
:
Add the module into the INSTALLED_APPS
INSTALLED_APPS = [
...
'gmailapi_backend',
...
]
Set the email backend
EMAIL_BACKEND = 'gmailapi_backend.mail.GmailBackend'
Define the configuration parameters from your Gmail developer account (see next section)
GMAIL_API_CLIENT_ID = 'client_id'
GMAIL_API_CLIENT_SECRET = 'client_secret'
GMAIL_API_REFRESH_TOKEN = 'refresh_token'
For using this package you need to obtain the OAuth credentials for a valid Gmail account.
This package includes the script linked in the documentation above, which simplifies the setup of the API credentials. The following outlines the key steps:
refresh_token
using the helper script included in the package:
gmail_oauth2 --generate_oauth2_token \
--client_id="<client_id>" \
--client_secret="<client_secret>" \
--scope="https://www.googleapis.com/auth/gmail.send"
FAQs
Email backend for Django which sends email via the Gmail API
We found that django-gmailapi-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.