#13259 closed (fixed)
multiple calls to message() breaks the mail content
| Reported by: | canburak | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Mail) | Version: | 1.1-beta |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | yes | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The message() function from django/core/mail/message.py pop's out From header from extra_headers, so as a side effect, multiple calls to message() generates an email which has the from_email in the From header, instead of the one set in the headers.
As a quick fix, one can reset "From" in extra headers just after calling the message().
Attachments (1)
Change History (7)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
IMO replacing pop with get is a good solution. I see no reason why a call to message() should change the extra_headers dictionary.
by , 16 years ago
| Attachment: | trac13259.diff added |
|---|
comment:3 by , 16 years ago
| Has patch: | set |
|---|---|
| milestone: | → 1.2 |
| Needs tests: | set |
| Triage Stage: | Unreviewed → Accepted |
comment:4 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:5 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
If this is not a design decision, replacing pop with get will solve the problem.