{"id":23557,"library":"django-amazon-ses","title":"Django Amazon SES","description":"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.","status":"active","version":"4.0.1","language":"python","source_language":"en","source_url":"https://github.com/azavea/django-amazon-ses","tags":["django","amazon-ses","email","backend","aws"],"install":[{"cmd":"pip install django-amazon-ses","lang":"bash","label":"install"}],"dependencies":[{"reason":"AWS SDK for Python, required for SES API calls","package":"boto3","optional":false},{"reason":"Django framework","package":"django","optional":false}],"imports":[{"note":"SESBackend is in the backends module, not top-level.","wrong":"from django_amazon_ses import SESBackend","symbol":"SESBackend","correct":"from django_amazon_ses.backends import SESBackend"}],"quickstart":{"code":"import os\nimport django\nfrom django.conf import settings\nfrom django.core.mail import send_mail\n\n# Configure Django settings\nsettings.configure(\n    DEBUG=True,\n    DATABASES={},\n    EMAIL_BACKEND='django_amazon_ses.backends.SESBackend',\n    AWS_ACCESS_KEY_ID=os.environ.get('AWS_ACCESS_KEY_ID', 'your-access-key'),\n    AWS_SECRET_ACCESS_KEY=os.environ.get('AWS_SECRET_ACCESS_KEY', 'your-secret-key'),\n    AWS_SES_REGION_NAME=os.environ.get('AWS_SES_REGION_NAME', 'us-east-1'),\n    AWS_SES_REGION_ENDPOINT='email.us-east-1.amazonaws.com',\n    DEFAULT_FROM_EMAIL='sender@example.com',\n)\ndjango.setup()\n\nsend_mail(\n    'Subject here',\n    'Here is the message.',\n    'sender@example.com',\n    ['recipient@example.com'],\n    fail_silently=False,\n)","lang":"python","description":"Minimal setup: configure Django settings with SES backend, then call send_mail."},"warnings":[{"fix":"Use Python 3.7+ and Django 3.2+.","message":"Version 4.0.1 drops Python 3.6 and Django 3.0/3.1 support. Upgrade Python to >=3.7 and Django to >=3.2.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SES_REGION_NAME in Django settings or environment variables.","message":"The email backend requires Boto3 credentials (access key, secret key, region) to be configured. Missing them causes silent failures or boto3 exceptions.","severity":"gotcha","affected_versions":"all"},{"fix":"Either verify all recipient addresses in SES console or request production access.","message":"SES 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'django_amazon_ses.backends.SESBackend' as EMAIL_BACKEND.","message":"The older backend path 'django_ses.SESBackend' was used in previous versions. The correct import is now 'django_amazon_ses.backends.SESBackend'.","severity":"deprecated","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install django-amazon-ses' and use 'from django_amazon_ses.backends import SESBackend'.","cause":"Package not installed or used wrong package name in import.","error":"ImportError: No module named 'django_amazon_ses'"},{"fix":"Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in Django settings or environment variables.","cause":"AWS credentials not provided to boto3.","error":"botocore.exceptions.NoCredentialsError: Unable to locate credentials"},{"fix":"Change EMAIL_BACKEND to 'django_amazon_ses.backends.SESBackend'.","cause":"Using the old backend path from earlier versions.","error":"django.core.mail.backends.base.InvalidEmailBackendError: 'django_ses.SESBackend' is not a valid email backend"},{"fix":"Verify the recipient's email address in SES console or request production access.","cause":"Sending to unverified email in SES sandbox.","error":"botocore.errorfactory.MessageRejected: An error occurred (MessageRejected) when calling the SendEmail operation: Email address is not verified."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}