Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19637 closed Bug (fixed)

AdminEmailHandler doesn't fail silently

Reported by: lsaffre 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 3 years ago by claudep

  • Component changed from Uncategorized to Core (Other)
  • Keywords regression added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Severity changed from Normal to Release blocker
  • Triage Stage changed from Unreviewed to Accepted

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

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

  • Resolution set to fixed
  • Status changed from new to closed

In c6e0dedbdb22f4db6577886a2b67e5423684fe7f:

Fixed #19637 -- Ensured AdminEmailHandler fails silently

Thanks lsaffre for the report. Refs #19325.

comment:3 Changed 3 years ago by claudep

  • Severity changed from Release blocker to Normal

FWIW, the 1.5 branch was not affected.

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