views:

40

answers:

1
MYMESSAGE = "<div>Hello</div><p></p>Hello"
send_mail("testing",MYMESSAGE,"[email protected]",['[email protected]'],fail_silently=False)

However, this message doesn't get the HTML mime type when it is sent. In my outlook, I see the code...

+4  A: 

From the docs:

msg = EmailMessage(subject, html_content, from_email, [to])
msg.content_subtype = "html"  # Main content is now text/html
msg.send()

You can only change the subtype of the mimetype it seems. So it will always be

"text/%s" % msg.content_subtype

Deniz Dogan