mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 00:42:17 +00:00
Update for premailer changed default
This commit is contained in:
@@ -13,6 +13,7 @@ from RIGS import models
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
# FIXME This needs a different implementation when moved off heroku
|
||||
help = 'Sends email reminders as required. Triggered daily through heroku-scheduler in production.'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
@@ -33,6 +34,6 @@ class Command(BaseCommand):
|
||||
reply_to=[f"h.s.manager@{settings.DOMAIN}"],
|
||||
)
|
||||
css = finders.find('css/email.css')
|
||||
html = premailer.Premailer(get_template("email/ra_reminder.html").render(context), external_styles=css).transform()
|
||||
html = premailer.Premailer(get_template("email/ra_reminder.html").render(context), external_styles=css, allow_loading_external_files=True).transform()
|
||||
msg.attach_alternative(html, 'text/html')
|
||||
msg.send()
|
||||
|
||||
Reference in New Issue
Block a user