From 7234777934e3db8a8abd2f5566b565703577a492 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Fri, 29 Sep 2017 20:07:05 -0400 Subject: [PATCH] Fixed send newsletter script --- newsletters/management/commands/sendnewsletters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newsletters/management/commands/sendnewsletters.py b/newsletters/management/commands/sendnewsletters.py index 001a550..a010efb 100644 --- a/newsletters/management/commands/sendnewsletters.py +++ b/newsletters/management/commands/sendnewsletters.py @@ -18,8 +18,8 @@ class Command(BaseCommand): print('Found %s unsent newsletters' % len(newsletters)) print('Found %s subscribers' % len(subscribers)) for newsletter in newsletters: - print('Sending newsletter: "$s"' % newsletter.subject) - mail.send_mail(newsletter.subject, strip_tags(newsletter.body), settings.EMAIL_HOST_USER, subscribers, html_message=render_to_string('email.html', {'content', newsletter.body})) + print('Sending newsletter: "%s"' % newsletter.subject) + mail.send_mail(newsletter.subject, strip_tags(newsletter.body), settings.EMAIL_HOST_USER, subscribers, html_message=render_to_string('email.html', {'content': newsletter.body})) newsletter.sent = True newsletter.save() print('Complete!')