Fixed send newsletter script
This commit is contained in:
parent
0885c9ae4f
commit
7234777934
@ -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!')
|
||||
|
Loading…
Reference in New Issue
Block a user