[Fix] 没有设置 *邮件默认主题* 邮件发送不成功

pull/4140/head
xinwen 2020-06-24 15:09:23 +08:00
parent 465fec3774
commit 355edce635
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ def send_mail_async(*args, **kwargs):
"""
if len(args) == 3:
args = list(args)
args[0] = settings.EMAIL_SUBJECT_PREFIX + args[0]
args[0] = (settings.EMAIL_SUBJECT_PREFIX or '') + args[0]
email_from = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
args.insert(2, email_from)
args = tuple(args)