mirror of https://github.com/jumpserver/jumpserver
fix: 邮件主题前缀设置不生效的问题
parent
539babcc97
commit
27c10fcae1
|
@ -49,6 +49,7 @@ def send_mail_attachment_async(subject, message, recipient_list, attachment_list
|
||||||
if attachment_list is None:
|
if attachment_list is None:
|
||||||
attachment_list = []
|
attachment_list = []
|
||||||
from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
|
from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
|
||||||
|
subject = (settings.EMAIL_SUBJECT_PREFIX or '') + subject
|
||||||
email = EmailMultiAlternatives(
|
email = EmailMultiAlternatives(
|
||||||
subject=subject,
|
subject=subject,
|
||||||
body=message,
|
body=message,
|
||||||
|
|
|
@ -11,6 +11,7 @@ class Email(BackendBase):
|
||||||
def send_msg(self, users, message, subject):
|
def send_msg(self, users, message, subject):
|
||||||
from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
|
from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
|
||||||
accounts, __, __ = self.get_accounts(users)
|
accounts, __, __ = self.get_accounts(users)
|
||||||
|
subject = (settings.EMAIL_SUBJECT_PREFIX or '') + subject
|
||||||
send_mail(subject, message, from_email, accounts, html_message=message)
|
send_mail(subject, message, from_email, accounts, html_message=message)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue