Opened 3 weeks ago

Closed 12 days ago

Last modified 12 days 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, 3 weeks ago

Description: modified (diff)

comment:2 by Natalia Bidart, 3 weeks ago

Easy pickings: unset
Triage Stage: UnreviewedAccepted

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, 3 weeks ago

Owner: set to Kona Naga Kartheek Reddy
Status: newassigned

comment:4 by Mike Edmunds, 3 weeks 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, 3 weeks ago

Has patch: set

comment:7 by Mike Edmunds, 3 weeks ago

Patch needs improvement: set

comment:8 by Kona Naga Kartheek Reddy, 3 weeks ago

Patch needs improvement: unset

comment:9 by Mike Edmunds, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:10 by Natalia Bidart, 2 weeks ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:11 by Kona Naga Kartheek Reddy, 13 days ago

Patch needs improvement: unset

comment:12 by Mike Edmunds, 13 days ago

Triage Stage: AcceptedReady for checkin

comment:13 by nessita <124304+nessita@…>, 12 days ago

Resolution: fixed
Status: assignedclosed

In 14c6682:

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

comment:14 by Natalia <124304+nessita@…>, 12 days 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