From a551326ec05f761f58a0ba68b4ca8af95d9e652d Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 12 Nov 2020 10:39:33 -0500 Subject: rearranged email templates, added footer to plain text email. --- app/lttr/mailer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/lttr/mailer.py') diff --git a/app/lttr/mailer.py b/app/lttr/mailer.py index b5b875e..9972ea2 100644 --- a/app/lttr/mailer.py +++ b/app/lttr/mailer.py @@ -72,11 +72,12 @@ class SendShit(): """ subject = smart_str("%s: %s — %s" %(self.mailing.newsletter.title, self.mailing.get_issue_str(), self.mailing.title)) from_email, to = 'Scott Gilbertson ', subscriber.get_email() - text_content = self.mailing.email_encode() - html_content = render_to_string('lttr/friends_base.html', {'object': self.mailing, 'subscriber':subscriber}) + text_content = render_to_string('lttr/emails/friends_plain_text_email.txt', {'object': self.mailing, 'subscriber':subscriber}) + html_content = render_to_string('lttr/emails/friends_html_email.html', {'object': self.mailing, 'subscriber':subscriber}) + print(text_content) msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) msg.attach_alternative(html_content, "text/html") - msg.send() + #msg.send() ''' for header, value in self.newsletter.server.custom_headers.items(): -- cgit v1.2.3-70-g09d2