I am using EmailMessage to send mail with an attachment. That attachment is .html file. I am successful in attaching the file in the email. But that html is not display properly. Html file is showing some tag in the attachment content.
Code return is as follows,
attach_file_name is the file path which I want to display i.e. "/path/of/html/file.html"
msg = EmailMessage(subject, content, from_email, to_list, cc=cc_list, bcc=bcc_list)
if attach_file_name:
msg.attach_file(attach_file_name)
msg.content_subtype = "html"
msg.send()
Please Help Me