[Django] #37141: sendtestemail needs a way to specify the MAILERS configuration

9 views
Skip to first unread message

Django

unread,
Jun 3, 2026, 1:17:58 PM (3 days ago) Jun 3
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Type:
| Cleanup/optimization
Status: new | Component: Core
| (Management commands)
Version: 6.1 | Severity: Normal
Keywords: mail, email | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
The [https://docs.djangoproject.com/en/stable/ref/django-
admin/#sendtestemail sendtestemail] management command always uses the
default `MAILERS` configuration. There's currently no way to test other
configurations with it.

We should add an optional `--using ALIAS` argument to `sendtestemail` to
specify the `MAILERS` configuration:

{{{#!shell
./manage.py sendtestemail --using notifications t...@example.com
./manage.py sendtestemail --managers --using internal
}}}

If `--using` is not provided, `sendtestemail` would use the default
`MAILERS` configuration.

[This was recommended as early follow-on work
[https://github.com/medmunds/deps/blob/a8c63074293e34cbf71fc185fccfae7cdf2a0b15/accepted/0018-mailers.md
#future-sendtestemail-using-option in DEP 0018]. I'm opening it as
"Cleanup" because it feels like a missing piece of #35514 rather than a
new feature. Or we may want to treat it as a "Bug" so it gets backported
to 6.1 (if it makes it in before beta).]
--
Ticket URL: <https://code.djangoproject.com/ticket/37141>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 3, 2026, 1:32:35 PM (3 days ago) Jun 3
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Mike Edmunds:

Old description:

> The [https://docs.djangoproject.com/en/stable/ref/django-
> admin/#sendtestemail sendtestemail] management command always uses the
> default `MAILERS` configuration. There's currently no way to test other
> configurations with it.
>
> We should add an optional `--using ALIAS` argument to `sendtestemail` to
> specify the `MAILERS` configuration:
>
> {{{#!shell
> ./manage.py sendtestemail --using notifications t...@example.com
> ./manage.py sendtestemail --managers --using internal
> }}}
>
> If `--using` is not provided, `sendtestemail` would use the default
> `MAILERS` configuration.
>
> [This was recommended as early follow-on work
> [https://github.com/medmunds/deps/blob/a8c63074293e34cbf71fc185fccfae7cdf2a0b15/accepted/0018-mailers.md
> #future-sendtestemail-using-option in DEP 0018]. I'm opening it as
> "Cleanup" because it feels like a missing piece of #35514 rather than a
> new feature. Or we may want to treat it as a "Bug" so it gets backported
> to 6.1 (if it makes it in before beta).]

New description:

The [https://docs.djangoproject.com/en/stable/ref/django-
admin/#sendtestemail sendtestemail] management command always uses the
default `MAILERS` configuration. There's currently no way to test other
configurations with it.

We should add an optional `--using ALIAS` argument to `sendtestemail` to
specify the `MAILERS` configuration:

{{{#!shell
./manage.py sendtestemail --using notifications t...@example.com
./manage.py sendtestemail --managers --using internal
}}}

If `--using` is not provided, `sendtestemail` would use the default
`MAILERS` configuration.

[This was recommended as early follow-on work
[https://github.com/django/deps/blob/main/accepted/0018-mailers.md#future-
sendtestemail-using-option in DEP 0018]. I'm opening it as "Cleanup"
because it feels like a missing piece of #35514 rather than a new feature.
Or we may want to treat it as a "Bug" so it gets backported to 6.1 (if it
makes it in before beta).]

--
--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:1>

Django

unread,
Jun 3, 2026, 6:09:00 PM (3 days ago) Jun 3
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* easy: 1 => 0
* stage: Unreviewed => Accepted

Comment:

Makes total sense, thank you Mike! I agree we should backport to 6.1.
Happy to assist with reviews to make it to the beta deadline (June 24th).
I'll remove easy picking to avoid LLM-derived rushed PRs. Also if you were
planning on working on this, please assign yourself asap.
--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:2>

Django

unread,
Jun 3, 2026, 6:16:47 PM (3 days ago) Jun 3
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Kona Naga Kartheek Reddy):

* owner: (none) => Kona Naga Kartheek Reddy
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:3>

Django

unread,
Jun 3, 2026, 6:59:52 PM (3 days ago) Jun 3
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mike Edmunds):

I'm happy to let someone else work on this one (and I can review).

Welcome Kona Naga Kartheek Reddy, looking forward to your PR! Please note
the timing considerations Natalia mentioned above.
--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:4>

Django

unread,
Jun 4, 2026, 1:34:34 PM (2 days ago) Jun 4
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Kona Naga Kartheek Reddy):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:5>

Django

unread,
Jun 4, 2026, 1:37:04 PM (2 days ago) Jun 4
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Kona Naga Kartheek Reddy):

PR : https://github.com/django/django/pull/21419
--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:6>

Django

unread,
Jun 4, 2026, 2:36:46 PM (2 days ago) Jun 4
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mike Edmunds):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:7>

Django

unread,
Jun 4, 2026, 4:42:46 PM (2 days ago) Jun 4
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Kona Naga Kartheek Reddy):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:8>

Django

unread,
Jun 4, 2026, 4:57:13 PM (2 days ago) Jun 4
to django-...@googlegroups.com
#37141: sendtestemail needs a way to specify the MAILERS configuration
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Kona Naga
Type: | Kartheek Reddy
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 6.1
commands) |
Severity: Normal | Resolution:
Keywords: mail, email | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mike Edmunds):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37141#comment:9>
Reply all
Reply to author
Forward
0 new messages