[Update] 邮件设置添加配置项:发送账号 (#2796)

This commit is contained in:
BaiJiangJie
2019-06-14 10:51:18 +08:00
committed by GitHub
parent 5286bf3ac1
commit 7715e62def
7 changed files with 110 additions and 69 deletions

View File

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