#36908: Email docs "quick example" shows unnecessary `fail_silently` param
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 6.0 | Severity: Normal
Keywords: docs email | Triage Stage:
fail_silently | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
The [
https://docs.djangoproject.com/en/6.0/topics/email/#quick-examples
"Quick examples"] section in the email docs includes
`fail_silently=False`:
{{{#!python
from django.core.mail import send_mail
send_mail(
"Subject here",
"Here is the message.",
"
fr...@example.com",
["
t...@example.com"],
fail_silently=False,
)
}}}
`fail_silently` is an optional param defaulting to `False`. Showing it in
the "straightforward" example suggests it's required or has some other
default, encouraging users to unnecessarily include it in their own code.
We should remove it from the example.
With the current django.core.mail implementation this isn't a huge deal,
but needless use of `fail_silently` may interact poorly with other changes
being contemplated in the email code (#35514).
--
Ticket URL: <
https://code.djangoproject.com/ticket/36908>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.