fix: Send email pdf deps

This commit is contained in:
wangruidong
2025-08-20 15:10:04 +08:00
committed by 老广
parent 5f87d98c31
commit 44bcd6e399
2 changed files with 3 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ class SendMailView(View):
# 4. 发送邮件
subject = f"{title} 报表"
from_email = settings.EMAIL_FROM
from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
to = [email]
msg = EmailMultiAlternatives(subject, '', from_email, to)
msg.attach_alternative(html_content, "text/html")