赞
踩
ref:https://docs.pythontab.com/jinja/jinja2/templates.html jinjia2的文档
ref:https://www.kancloud.cn/wizardforcel/flask-extension-docs/125988 flask的拓展文档
发送邮件设置:
app.config['MAIL_SERVER'] = 'smtp.qq.com' app.config['MAIL_PORT'] = 465 app.config['MAIL_USE_SSL'] = True app.config['MAIL_USE_TSL'] = False app.config['MAIL_USERNAME'] = '514422868@qq.com' app.config['MAIL_PASSWORD'] = 'sadsdada' app.config['MAIL_SUBJECT_PREFIX'] = '[鱼书]' app.config['MAIL_SENDER'] = '鱼书 <514422868@qq.com>' def send_mail(to, subject, template, **kwargs): # msg = Message("[鱼书]" + " " + subject, sender= # recipients=["to@example.com"]) # msg = Message("Hello", sender="514422868@qq.com", recipients=["514422868@qq.com"]) return mail.send(msg)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。