feature request: include optional html_message in send_mass_mail tuple

62 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Michael Scheper

ungelesen,
03.03.2017, 19:26:4803.03.17
an Django developers (Contributions to Django itself)
It seems I'm not the only one who wants to include HTML in messages sent via send_mass_mail(). It also seems an easy feature to add; if the tuple has a fifth element, assume it's an html_message.

Actually, I feel like I'm reinventing the wheel by passing it though django.template.loader.render_to_string(), too. I've copied the same six-line function to numerous projects already.

I'm suggesting these features here, as per Requesting features in the docs.

Thanks!

Tim Graham

ungelesen,
04.03.2017, 10:12:1204.03.17
an Django developers (Contributions to Django itself)
Hi Michael, it looks like we're not enhancing send_mass_mail() as per the docstring [0]: "The API for this method is frozen. New code wanting to extend the functionality should use the EmailMessage class directly." Perhaps the documentation could be clarified.

[0] https://github.com/django/django/commit/d5d2072bbfc38015a93d6e13136c3f1dbf125d87
Allen antworten
Antwort an Autor
Weiterleiten
Die Nachricht wurde gelöscht
0 neue Nachrichten