#36132: Add **kwargs to send_mail() and send_mass_mail() functions
-------------------------------------+-------------------------------------
Reporter: Nikolay Fedorov | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: Core (Mail) | Version: 5.1
Severity: Normal | Resolution: wontfix
Keywords: send_email, | Triage Stage:
send_mass_mail, mail | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Nikolay Fedorov):
Replying to [comment:3 Simon Charette]:
> The fact that `user.send_mail` delegates `**kwargs` to `mail.send_mail`
which has a documented signature only makes it so both share the same
interface.
>
> I don't see what is incoherent about `send_mail` not passing arbitrary
kwargs to `EmailMessage`. In other words, I don't see why a function that
opts in `**kwargs` delegation should force all functions down its stack to
also do so.
I didn't mean arbitrary arguments, but I wanted to be able to use all the
available documented ones for `EmailMessage`, such as `headers`. Now, for
this, I have to use my own rewritten version of `send_mail` to simply
transfer headers. This is a discrepancy between the system components and
not a convenience.
--
Ticket URL: <https://code.djangoproject.com/ticket/36132#comment:4>
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 visit
https://groups.google.com/d/msgid/django-updates/01070194979d183f-7f753320-7959-479e-9b07-de635087f4d0-000000%40eu-central-1.amazonses.com.