from django.core.mail import EmailMultiAlternatives
subject, from_email, to = 'hello', '[email protected]', '[email protected]'
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()
可能であれば、画像を含め、適切に設計されたニュースレターや電子メールを送信したいと考えています。私は、HTMLテンプレートファイルにこのdjangoからプロの電子メールを送信
html_content = '<p>This is an <strong>important</strong> message.</p>'
を変更することができれば、私は思っていました。その後、どのように私はQuoraのと他のwebsites.`
[Djangoで電子メールテンプレートを作成する]の可能な複製(0120-919-03-J) – Sayse