perf: 优化邮件参数

This commit is contained in:
halo
2023-07-17 22:13:58 +08:00
committed by Bryan
parent be17fe6c31
commit 6338ecc6fe
2 changed files with 2 additions and 7 deletions

View File

@@ -78,9 +78,7 @@ class SendAndVerifyCodeUtil(object):
def __send_with_email(self):
subject = self.other_args.get('subject')
message = self.other_args.get('message')
from_email = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
subject = (settings.EMAIL_SUBJECT_PREFIX or '') + subject
send_mail_async.delay(subject, message, from_email, [self.target], html_message=message)
send_mail_async(subject, message, [self.target], html_message=message)
def __send(self, code):
"""