Registry / aws / django-amazon-ses

django-amazon-ses

JSON →
library4.0.1pypypi✓ verified 81d ago

A Django email backend that uses Boto3 to interact with Amazon Simple Email Service (SES). Version 4.0.1 drops Python 3.6 and Django 3.0/3.1 support, adds Python 3.9/3.10 and Django 3.2/4.0, and enables email tagging.

pip install django-amazon-ses
INSTALL
IMPORT
SIG · DJANGO-AMAZON-SES
D
django-amazon-ses
awspythonv4.0.1
Install
5.6s avg
Import
Disk
99MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 99.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.6s · import 0.000s · 100MB
99MB installed
● package 99MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EmailBackend
from django_amazon_ses import EmailBackend
from django_amazon_ses.backends import SESBackend
BaseEmailBackend
from django_amazon_ses import BaseEmailBackend
sanitize_address
from django_amazon_ses import sanitize_address

Minimal setup: configure Django settings with SES backend, then call send_mail.

import os import django from django.conf import settings from django.core.mail import send_mail # Configure Django settings settings.configure( DEBUG=True, DATABASES={}, EMAIL_BACKEND='django_amazon_ses.backends.SESBackend', AWS_ACCESS_KEY_ID=os.environ.get('AWS_ACCESS_KEY_ID', 'your-access-key'), AWS_SECRET_ACCESS_KEY=os.environ.get('AWS_SECRET_ACCESS_KEY', 'your-secret-key'), AWS_SES_REGION_NAME=os.environ.get('AWS_SES_REGION_NAME', 'us-east-1'), AWS_SES_REGION_ENDPOINT='email.us-east-1.amazonaws.com', DEFAULT_FROM_EMAIL='sender@example.com', ) django.setup() send_mail( 'Subject here', 'Here is the message.', 'sender@example.com', ['recipient@example.com'], fail_silently=False, )
Debug
Known issues
breakingVersion 4.0.1 drops Python 3.6 and Django 3.0/3.1 support. Upgrade Python to >=3.7 and Django to >=3.2.
fix
Use Python 3.7+ and Django 3.2+.
affects: >=4.0.0
gotchaThe email backend requires Boto3 credentials (access key, secret key, region) to be configured. Missing them causes silent failures or boto3 exceptions.
fix
Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SES_REGION_NAME in Django settings or environment variables.
affects: all
gotchaSES sandbox mode restricts sending to verified email addresses only unless you move out of sandbox. Emails to unverified recipients will fail with a 550 error.
fix
Either verify all recipient addresses in SES console or request production access.
affects: all
deprecatedThe older backend path 'django_ses.SESBackend' was used in previous versions. The correct import is now 'django_amazon_ses.backends.SESBackend'.
fix
Use 'django_amazon_ses.backends.SESBackend' as EMAIL_BACKEND.
affects: >=4.0.0
Upgrade
Version history
4.0.1latest on PyPI · released Apr 4, 2022
Audit
Dependencies
boto3requiredAWS SDK for Python, required for SES API calls
djangorequiredDjango framework
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
django-amazon-ses — pip install django-amazon-ses · libregistry