Prechádzať zdrojové kódy

feat: 自定义sender

SongZihuan 2 rokov pred
rodič
commit
4dc526d5c0
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      send_email/__init__.py

+ 1 - 1
send_email/__init__.py

@@ -5,7 +5,7 @@ from configure import conf
 
 def send_msg(title: str, mail: Mail, to, template, **kwargs):
     """ 邮件发送 """
-    sender = f"HBlog Admin <{conf['MAIL_SENDER']}>"
+    sender = conf['MAIL_SENDER']
     message = Message(conf['MAIL_PREFIX'] + title, sender=sender, recipients=[to])
     message.body = render_template("email-msg/" + template + ".txt", **kwargs)
     message.html = render_template("email-msg/" + template + ".html", **kwargs)