diff --git a/apps/notification/utils.py b/apps/notification/utils.py index c04b3c0e..d556bd96 100644 --- a/apps/notification/utils.py +++ b/apps/notification/utils.py @@ -7,9 +7,9 @@ from project.celery import app @app.task -def send_email(subject, to_email, template_name, **kwargs): +def send_email(subject, to_email, template_name, attachments=[], **kwargs): html = get_template(template_name).render(kwargs) - email = EmailMessage(subject, html, to=[to_email]) + email = EmailMessage(subject, html, to=[to_email], attachments=attachments) email.content_subtype = 'html' email.send()