Django has another option to send HTML messages. We can use the 
render_to_string() 
<https://docs.djangoproject.com/en/1.10/topics/templates/> function to 
generate the message and then send it using send_mass_mail()

Em sexta-feira, 3 de março de 2017 21:26:48 UTC-3, Michael Scheper escreveu:
>
> It seems I'm not the only one 
> <http://stackoverflow.com/questions/7583801/send-mass-emails-with-emailmultialternatives>
>  
> who wants to include HTML in messages sent via send_mass_mail() 
> <https://docs.djangoproject.com/en/1.10/topics/email/#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() 
> <https://docs.djangoproject.com/en/1.10/topics/templates/#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 
> <https://docs.djangoproject.com/en/dev/internals/contributing/bugs-and-features/#requesting-features>
>  
> in the docs.
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b663578b-bbd2-4f9e-a9d9-f9c87a74c93c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to