Skip to content

DEP 0018 Mailers cleanup (f.k.a. email providers)#111

Open
medmunds wants to merge 4 commits into
django:mainfrom
medmunds:mailers-cleanup
Open

DEP 0018 Mailers cleanup (f.k.a. email providers)#111
medmunds wants to merge 4 commits into
django:mainfrom
medmunds:mailers-cleanup

Conversation

@medmunds
Copy link
Copy Markdown
Contributor

@medmunds medmunds commented May 14, 2026

Followup from PR #105 and some other cleanup:

  • Rename EMAIL_PROVIDERS to MAILERS (assisted by GPT-5.5)
  • Clarify deprecation warning when no email-related settings are defined
  • Update PR and status
  • Add sendtestmail --using ALIAS option as suggested future work

Also, I'd suggest renaming the file to 0018-mailers.md at some point—perhaps when it it is moved out of the draft directory. (Renaming the file will likely complicate reviewing any other changes in GitHub.)

medmunds added 2 commits May 13, 2026 17:52
Update when warning is issued. Clarify purpose and content of warning.
medmunds added 2 commits May 14, 2026 16:34
Renaming based on discussion in earlier PR.

First-pass renaming by Codex GPT-5.5 (medium).
Additional review and editing by me (XL).
@medmunds medmunds marked this pull request as ready for review May 14, 2026 23:49
@medmunds medmunds changed the title Mailers cleanup DEP 0018 Mailers cleanup (f.k.a. email providers) May 14, 2026
Comment thread draft/email-providers.md
Copy link
Copy Markdown
Contributor

@LilyFirefly LilyFirefly May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should include the DEP number: draft/0018-email-providers.md.
It might also make sense to rename to draft/0018-mailers.md.
Finally, perhaps we should move this to accepted/0018-mailers.md in this PR?

Edit - oh, I see you mentioned this in your PR summary!

Comment thread draft/email-providers.md
@@ -6,25 +6,25 @@ Shepherd: Natalia Bidart
Status: Draft
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move this to Accepted?

Copy link
Copy Markdown

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm… now that I see it, I have become hesitant. It reads funny (but English is my second language).

Naming things is hard, but if I have learned anything in the past years, inventing words never pans out.

So I read into the RFC 5321 and here they are explicitly referred to as Gateway.

A "gateway" SMTP system (usually referred to just as a "gateway")
receives mail from a client system in one transport environment and
transmits it to a server system in another transport environment.
Differences in protocols or message semantics between the transport
environments on either side of a gateway may require that the gateway
system perform transformations to the message that are not permitted
to SMTP relay systems. For the purposes of this specification,
firewalls that rewrite addresses should be considered as gateways,
even if SMTP is used on both sides of them (see RFC 2979 [27]).

We are currently only supporting RFC 5321 (SMTP) messages, but let's look into the future: SMS calls them gateways too. RCS is only a message spec, the SIP (RFC 3261) for transport. Here gateway refers to PTSN bridges. But no sane person will ever build their own VoIP stack.


TL;DR: My conclusion: EMAIL_GATEWAYS and django.core.mail.gateways and django.core.mail.default_gateway.

Comment thread draft/email-providers.md
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to update the filename too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants