Hello,
I able to send an html email using the code below:
///
def emaildiscount(request):
subject, from_email, to = 'hello', '
us...@domain.com',
'
us...@domain.com'
text_content = 'This is an important message.'
html_content = '<p>This is an <strong>important</strong> message.</
p>'
msg = EmailMultiAlternatives(subject, text_content, from_email,
[to])
msg.attach_alternative(html_content, "text/html")
msg.send()
///
However, I've now created a .htm file that I want to use as the email
content. The .htm template is over 100 lines long. I don't think
pasting the code into the view is the smart thing to do. Does django
allow the html_content variable to access my .htm file?
Thanks