Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#19637 closed Bug (fixed)

AdminEmailHandler doesn't fail silently

Reported by: Luc Saffre Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords: regression
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The AdminEmailHandler should fail silently (i think that's intended behaviour because e.g. a wrong email address would cause recursive tracebacks).

But in today's development version (Django 1.6.dev20130119072716) it doesn't.

The emit() method says:

        mail.mail_admins(subject, message, fail_silently=True,

But the fail_silently=True parameter is being ignored because 2 lines later in the code you have::

    def connection(self):
        return get_connection(backend=self.email_backend)

This should probably be (at least it worked for me)::

    def connection(self):
        return get_connection(backend=self.email_backend,fail_silently=True)

Change History (3)

comment:1 Changed 7 years ago by Claude Paroz

Component: UncategorizedCore (Other)
Keywords: regression added
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

The regression has been introduced in [f9891f20872e2a468c4910a968c5e2fae75d0e51] (#19325).

comment:2 Changed 7 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In c6e0dedbdb22f4db6577886a2b67e5423684fe7f:

Fixed #19637 -- Ensured AdminEmailHandler fails silently

Thanks lsaffre for the report. Refs #19325.

comment:3 Changed 7 years ago by Claude Paroz

Severity: Release blockerNormal

FWIW, the 1.5 branch was not affected.

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