Nice API for sending HTML emails in Django

20 views
Skip to first unread message

Ram Rachum

unread,
Apr 19, 2012, 4:05:10 PM4/19/12
to pyweb-il
Hey guys,

The way I currently send HTML emails with Django is too verbose. I do something like this:

message = EmailMultiAlternatives(subject, text_content, from_email, [to])
message.attach_alternative(html_content, "text/html")
message.send()

Did anyone make a function that wraps all of this bullshit and just takes an `html_content` argument? I'm probably gonna make one, but if someone made one I'll be happy to see it, it might have more goodies or things I didn't think about.


Ram.
Reply all
Reply to author
Forward
0 new messages