Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#37141 closed Cleanup/optimization (fixed)

sendtestemail needs a way to specify the MAILERS configuration

Reported by: Mike Edmunds Owned by: Kona Naga Kartheek Reddy
Component: Core (Management commands) Version: 6.1
Severity: Normal Keywords: mail, email
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mike Edmunds)

The ​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:

./manage.py sendtestemail --using notifications to@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 ​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).]

Change History (14)

comment:1 by Mike Edmunds, 4 months ago

Description: modified (diff)

comment:2 by Natalia Bidart, 4 months ago

Easy pickings: unset
Triage Stage: Unreviewed → Accepted

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.

comment:3 by Kona Naga Kartheek Reddy, 4 months ago

Owner: set to Kona Naga Kartheek Reddy
Status: new → assigned

comment:4 by Mike Edmunds, 4 months ago

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.

comment:5 by Kona Naga Kartheek Reddy, 4 months ago

Has patch: set

comment:7 by Mike Edmunds, 4 months ago

Patch needs improvement: set

comment:8 by Kona Naga Kartheek Reddy, 4 months ago

Patch needs improvement: unset

comment:9 by Mike Edmunds, 4 months ago

Triage Stage: Accepted → Ready for checkin

comment:10 by Natalia Bidart, 4 months ago

Patch needs improvement: set
Triage Stage: Ready for checkin → Accepted

comment:11 by Kona Naga Kartheek Reddy, 4 months ago

Patch needs improvement: unset

comment:12 by Mike Edmunds, 4 months ago

Triage Stage: Accepted → Ready for checkin

comment:13 by nessita <124304+nessita@…>, 4 months ago

Resolution: → fixed
Status: assigned → closed

In 14c6682:

Fixed #37141 -- Added --using option to sendtestemail command.

comment:14 by Natalia <124304+nessita@…>, 4 months ago

In 96080325:

[6.1.x] Fixed #37141 -- Added --using option to sendtestemail command.

Backport of 14c66825e0088b7e08fe5d108fa293bd31722c39 from main.

Note: See TracTickets for help on using tickets.
Back to Top