#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 Mike Edmunds):

 If the primary request here is for the
 
[https://docs.djangoproject.com/en/5.1/ref/contrib/auth/#django.contrib.auth.models.User.email_user
 User.email_user()] method to accept additional arguments like `headers` or
 `reply_to`, that ''might'' be a reasonable feature request. There are ways
 to achieve that without changing the "frozen" mail.send_mail() API, by
 updating User.email_user() from legacy send_mail() to using the newer
 EmailMessage classes. (My opinion only; I don't speak for Django.)

 If that's your goal, the next step would be to raise the idea in the
 [https://forum.djangoproject.com/ forum] to seek feedback. It would help
 to include a concrete example of what you're trying to do (e.g., what
 headers you need to add in `User.email_user()`).

 Or, if the primary request here is a single statement that sends mail with
 headers, you can achieve that now with the EmailMessage (or
 EmailMultiAlternatives) class:

 {{{#!python
 EmailMessage(subject, message, from_email, to, headers={"In-Reply-To":
 "..."}).send()
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36132#comment:5>
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/01070194aeb5bc7e-b0bba170-a102-4b29-b001-b60476fd3c04-000000%40eu-central-1.amazonses.com.

Reply via email to