Opened 8 years ago

Closed 7 years ago

#4707 closed (wontfix)

Allow attachements in mail_{admins,managers}

Reported by: calvin@… Owned by: thejaswi_puthraya
Component: Core (Mail) Version: master
Severity: Keywords: sprintdec01
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The patch adds a parameter to send attachements with mail_admins() and mail_managers() methods.

Attachments (2)

mail_attachements.diff (1.3 KB) - added by calvin@… 8 years ago.
mail_attachments_1.diff (1.3 KB) - added by thejaswi_puthraya 7 years ago.
corrected the typos in the previous diff

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by calvin@…

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

As explained in the documentation, the whole idea of creating the more object-oriented design for email was to avoid adding more and more parameters to the existing methods. Those methods are there for backwards compatibility only. They won't be extended with any new parameters (if you want to use the new features, you have to change your code anyway. Switching to using EmailMessage takes no time).

comment:2 Changed 8 years ago by mtredinnick

  • Component changed from Uncategorized to django.core.mail
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Triage Stage changed from Unreviewed to Design decision needed

Thinking this over a bit more, there might be a case for admin and manager mail to allow it, since the equivalent code is a bit fiddly to write.

(We can't use the existing patch, though, since it misspells "attachment" everywhere.)

comment:3 Changed 7 years ago by calvin@…

Perhaps it is helpful to tell for what I am needing this. Whenever a server error occurs, I mail a traceback.html attachment (which is manually generated from the django debug error view) using the mail_admins() method. Then I can open the traceback.html on my local box and analyze the problem without touching the server which runs in non-debug mode.

I will send an updated patch without the spelling error once I get to it.

Changed 7 years ago by thejaswi_puthraya

corrected the typos in the previous diff

comment:4 Changed 7 years ago by thejaswi_puthraya

  • Keywords sprintdec01 added
  • Owner changed from nobody to thejaswi_puthraya
  • Status changed from reopened to new
  • Triage Stage changed from Design decision needed to Ready for checkin

comment:5 Changed 7 years ago by mtredinnick

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

This isn't worth extending the API for. If you want to add extra stuff beyond want mail_admins does, you can write your own handler and an exception middleware. The support already exists for that.

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