fix: Send email pdf deps

pull/15888/head
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

@ -14,7 +14,8 @@ ARG TOOLS=" \
telnet \
vim \
postgresql-client-13 \
wget"
wget \
poppler-utils"
RUN set -ex \
&& apt-get update \

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")