Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19637 closed Bug (fixed)

AdminEmailHandler doesn't fail silently

Reported by: Luc Saffre Owned by: nobody
Component: Core (Other) Version: dev
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

Description

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,
                         html_message=html_message,
                         connection=self.connection())

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 by Claude Paroz, 12 years ago

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

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

comment:2 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In c6e0dedbdb22f4db6577886a2b67e5423684fe7f:

Fixed #19637 -- Ensured AdminEmailHandler fails silently

Thanks lsaffre for the report. Refs #19325.

comment:3 by Claude Paroz, 12 years ago

Severity: Release blockerNormal

FWIW, the 1.5 branch was not affected.

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