#37161: Implement a system check for deprecated mail settings
-----------------------------+------------------------------------
     Reporter:  Jacob Walls  |                    Owner:  (none)
         Type:  New feature  |                   Status:  new
    Component:  Core (Mail)  |                  Version:  dev
     Severity:  Normal       |               Resolution:
     Keywords:               |             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):

 So the goal is a system check that warns if `"default" not in
 settings.MAILERS`. Couple of questions:
 * Projects that haven't configured `MAILERS` because they don't send mail
 will need to silence the check. Are we OK with that? 🤔
 * None of the [https://docs.djangoproject.com/en/6.1/ref/checks/#builtin-
 tags built-in tags] seem to apply. I'm thinking we should add a tag for
 `mail`?

 Other notes:
 * This check could be added immediately, but before 7.0 the test will need
 to be `hasattr(settings, "MAILERS") and …` (because `MAILERS` doesn't
 exist by default until 7.0).
 * Suggested `msg`: "There is no 'default' configuration in your MAILERS
 setting."
 * Suggested `hint`:
   * If `MAILERS` is empty: "Sending email will cause an error."
   * If `MAILERS` has other keys: "Sending email without specifying 'using'
 will cause an error."
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37161#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019ebe2779cc-4bcff5ec-d4e3-49eb-bff2-0bf0e7ae6e4b-000000%40eu-central-1.amazonses.com.

Reply via email to