#35033: EmailMessage repeats header if provided via the headers kwargs
--------------------------------+-----------------------------------------
Reporter: Aalekh Patel | Owner: Salvo Polizzi
Type: Bug | Status: assigned
Component: Core (Mail) | Version: dev
Severity: Normal | Resolution:
Keywords: email, headers | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------+-----------------------------------------
Changes (by Mike Edmunds):
* cc: Mike Edmunds (added)
Comment:
Note: #9214 added special handling for supplying `from_email=...` with a
different `headers={"From": ...}`: the header value is displayed in the
message, the `from_email` value is used as envelope-from/return-path.
I can't find the reference now, but I believe using `to=...` with a
different `headers={"To": ...}` was added around the same time and has a
similar purpose: specifying the recipient separately from the displayed
recipient. (This is sometimes used for distribution lists, where the list
name is displayed in the header To field. It's also used for spam.)
In both cases, the `headers` value needs to ''override'' the property
value in the generated message header. (Not create an additional header.)
It seems like there might also be missing tests for these special cases?
[django-anymail maintainer here; a few years back, we got a
[[https://github.com/anymail/django-anymail/issues/91|specific request]]
to match the Django SMTPBackend's handling of these headers.]
--
Ticket URL: <https://code.djangoproject.com/ticket/35033#comment:32>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070190467c3c74-2f1b0e0b-22c2-4aa0-aa38-279a758e4110-000000%40eu-central-1.amazonses.com.