In django how to make a letter?

Hi all, the bottom line is, send emails from django using.core.mail import send_mail, the code of sending:
context = {
 'order': order,
}
send_mail(
 'Thanks for order',
get_template('emails/confirmation.html').render(
Context({
 'context': context,
})
),
email_from,
[order.email],
fail_silently=True
 )

The template itself confirmation.html with a tabular layout, without any styles, but when a letter comes in the mail in Prime display table, etc., and the tags table, tr, td. Tell me or I do not understand, or django doesn't know how to send html emails with tags without third-party packages? Googled the answer or example, could not find it. Thank you.
July 9th 19 at 13:14
2 answers
July 9th 19 at 13:16
Solution
Look at the send_mail syntax, the second parameter is plain_text
def send_mail(subject, message, from_email, recipient_list,
 fail_silently=False, auth_user=None, auth_password=None,
 connection=None, html_message=None):


context = {
 'order': order,
}
send_mail(
 'Thanks for order',
'blablabla',
email_from,
[order.email],
fail_silently=True,
html_message=get_template('emails/confirmation.html').render(context)
)
Thanks, understood - Germaine.Abbott21 commented on July 9th 19 at 13:19
July 9th 19 at 13:18
Tell me, what about the styles? Styles is also in the template to integrate, but not stored in css?

Find more questions by tags DjangoPython