Update for premailer changed default

This commit is contained in:
2025-10-05 19:49:28 +01:00
parent 949fbfd5fb
commit 93c576fad8
3 changed files with 6 additions and 5 deletions

View File

@@ -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()