Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#36908 closed Cleanup/optimization (fixed)

Email docs "quick example" shows unnecessary `fail_silently` param

Reported by: Mike Edmunds Owned by: SnippyCodes
Component: Documentation Version: 6.0
Severity: Normal Keywords: docs email fail_silently
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

The Quick examples section in the email docs includes fail_silently=False:

from django.core.mail import send_mail

send_mail(
    "Subject here",
    "Here is the message.",
    "from@example.com",
    ["to@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).

Change History (6)

comment:1 by Ahmed Asar, 3 weeks ago

Hi Mike,
if the mentor approves this ticket, I’d like to work on it. Is that okay?

comment:2 by Vidhi Singh, 3 weeks ago

Hi ,
I’m interested in working on this documentation cleanup.
Before starting, could a maintainer please confirm that this change (removing fail_silently=False from the email quick example) is acceptable and aligns with Django docs style?
Thank you!

comment:3 by SnippyCodes, 3 weeks ago

Has patch: set
Owner: set to SnippyCodes
Status: newassigned

comment:4 by Natalia Bidart, 3 weeks ago

Triage Stage: UnreviewedAccepted

Thank you Mike! I agree it's worth removing.

comment:5 by GitHub <noreply@…>, 3 weeks ago

Resolution: fixed
Status: assignedclosed

In 0deedbd:

Fixed #36908 -- Removed unnecessary "fail_silently" param from quick example in docs/topics/email.txt.

comment:6 by Natalia Bidart, 3 weeks ago

Triage Stage: AcceptedReady for checkin
Note: See TracTickets for help on using tickets.
Back to Top