How to send an email to Django with a specific mimetype type?
MYMESSAGE = "<div>Hello</div><p></p>Hello" send_mail("testing",MYMESSAGE," noreply@mydomain.com ",[' assdf@gmail.com '],fail_silently=False) However, this message does not receive the HTML mime type when sending it. In my forecast, I see the code ...
+6
TIMEX
source share1 answer
From documents :
msg = EmailMessage(subject, html_content, from_email, [to]) msg.content_subtype = "html" # Main content is now text/html msg.send() You can only change a subtype of type mimetype. Therefore he will always be
"text/%s" % msg.content_subtype
+6
Deniz dogan
source share