プレーンHTMLの代わりにテンプレートを呼び出して、djangoコアメールでメールを送信するにはどうすればよいですか?
私の見解:
to = articles.user.email
html_content = '<p>This is your email content...</p>'
msg = EmailMultiAlternatives('You have an email',html_content,'from@server.com',[to])
msg.attach_alternative(html_content,'text/html')
msg.send()
表示されている変数html_content
はプレーンな HTML ですが、ここでテンプレートを呼び出すにはどうすればよいでしょうか? このテンプレートは、電子メールのコンテンツになります。