Email delivery for Django in production
Sending transactional email from Django so it arrives: providers, SMTP, authentication records, and bounces.
Sending email from Django is easy; getting it delivered is not. Deliverability depends on the provider, domain authentication with SPF, DKIM, and DMARC, and handling bounces.
The guides cover SMTP and API providers such as Amazon SES, the DNS records that prove your domain, and fixing email that silently never arrives.
Set it up
Guides that take this from nothing to running in production.
- Configure Django Email Sending in Production
Send Django email reliably in production: SMTP TLS settings, sender addresses, SPF, DKIM and DMARC, timeouts, background sending, and tests.
- Send Django Email with Amazon SES
Send Django email through Amazon SES: domain verification with DKIM, leaving the sandbox, SMTP or django-ses API backends, IAM permissions, custom MAIL FROM, and bounce handling.
- Send Django Email Through SendGrid, Postmark, or Mailgun With Anymail
Use django-anymail to send Django email through an email API such as SendGrid, Postmark, Mailgun, Brevo, or Amazon SES: configure the backend, verify the sending domain, handle tracking webhooks and bounces, and test without sending.
- Send Django Email in the Background
Send Django email outside the request cycle: queue emails with Celery after commit, retry provider failures with backoff, use django-celery-email or a custom backend, keep templates rendered in the task, and avoid duplicate sends.
Check it
Review lists to run before launch or after a change.
- Django Email Deliverability Checklist
Make Django's transactional email reach inboxes: a reputable provider, SPF, DKIM, and DMARC alignment, sender addresses, bounce and complaint handling, content hygiene, background sending, and monitoring.
- Django Email Production Checklist
A production checklist for email from Django: a transactional provider or Anymail backend, sending from Celery after commit, SPF, DKIM, and DMARC, bounce and complaint webhooks, separate streams for marketing, templates with text parts, staging safety, and monitoring.
Fix it
Errors and symptoms, each traced to a cause and a fix.
- Fix Django Emails Not Sending in Production
Diagnose Django emails that never arrive: backend settings, fail_silently, blocked SMTP ports, provider rejections, Celery tasks, and domain authentication.
- Fix Django Email "[SSL: WRONG_VERSION_NUMBER]" and SMTP TLS Errors
Fix Django SMTP errors such as SSL WRONG_VERSION_NUMBER, STARTTLS extension not supported, and connection unexpectedly closed: match EMAIL_PORT with EMAIL_USE_TLS or EMAIL_USE_SSL, and test the provider’s port from the server.
- Fix Django Links Using example.com (Sites Framework)
Fix password reset emails, sitemaps, and allauth links that point to example.com: update the Site record, set SITE_ID, handle multiple environments, and get https in generated links.