#35365: Add RFC 3834 Auto-Submitted header to emails by default
---------------------------------+------------------------------------
Reporter: Tobias Bengfort | Owner: cgracin
Type: New feature | Status: assigned
Component: Core (Mail) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by Tobias Bengfort):
The documentation already contains this line:
Not all features of the EmailMessage class are available through the
send_mail() and related wrapper functions. If you wish to use advanced
features, such as BCC’ed recipients, file attachments, or multi-part
email, you’ll need to create EmailMessage instances directly.
https://docs.djangoproject.com/en/5.0/topics/email/#the-emailmessage-
class
For consistency I think we should also add the `Auto-Submitted` header in
the wrapper functions.
The special thing here would be that dropping down to `EmailMessage`
allows you to ''remove'' a header rather than add one. I am not sure how
best to explain that in the docs. I see that most parameters are only
documented once for `send_mail()` and not repeated for the other wrapper
functions. So maybe it would be sufficient to add a note only to
`send_mail()`. The note could be something like this:
`send_mail()` uses the `Auto-Submitted` mail header to indicate that
the mail was created by software rather than a human.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35365#comment:9>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.