From 956e45bfcbc64c1120479967a80f745a9eeab543 Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Sat, 8 Mar 2014 10:40:55 -0800 Subject: [PATCH] Correct Django template example Fixes #60. --- docs/usage/templates.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/templates.rst b/docs/usage/templates.rst index 368f0e8..8b9acfc 100644 --- a/docs/usage/templates.rst +++ b/docs/usage/templates.rst @@ -63,8 +63,8 @@ Example that builds an email from the templates ``message_subject.txt``, text_body = render_to_string("message_body.txt", template_data, plaintext_context) html_body = render_to_string("message_body.html", template_data) - msg = EmailMessage(subject=subject, from_email="store@example.com", - to=["customer@example.com"], body=text_body) + msg = EmailMultiAlternatives(subject=subject, from_email="store@example.com", + to=["customer@example.com"], body=text_body) msg.attach_alternative(html_body, "text/html") msg.send()