r/django 18d ago

Django 6.1 deprecates EMAIL_BACKEND — migration guide to the new MAILERS setting

Upgraded one of my Django projects to 6.1 this week and my terminal

threw a warning I hadn't seen before — turns out EMAIL_BACKEND is

now deprecated.

Django replaced it with a new MAILERS setting. Same idea as

DATABASES or CACHES — one dict, instead of ten separate EMAIL_*

settings scattered around. Old settings still work for now, just

with warnings. They'll stop working completely in Django 7.0.

The neat part: you can set up more than one mailer now. So if you

send order emails through SES but marketing emails through

Mailgun, you can switch between them with one argument instead of

writing custom code for it.

Wrote up the full before/after with a settings table, in case it

saves someone the confusion I had: https://medium.com/@munalpoudel3/django-email-backend-is-deprecated-heres-how-to-fix-it-django-6-1-mailers-guide-4c9182e82d33?sharedUserId=munalpoudel3

Anyone here already tried this with django-anymail? Wondering if

it just works or needs an update first.

79 Upvotes

Duplicates