Flask-Mail不发送邮件,没有错误报告 [英] Flask-Mail not sending emails, no error is being reported

查看:344
本文介绍了Flask-Mail不发送邮件,没有错误报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有,我试图设置烧瓶邮件发送通知给我的电子邮件时,用户注册。
我没有收到用于发送电子邮件的脚本的错误信息,但是没有发送任何信息,或者至少没有收到任何信息。



是否有一个日志文件,可以显示电子邮件是否被发送,拒绝,或者甚至有问题登录到服务器?如何跟踪这个问题?



这里的任何想法?

解决方案

Flask-Email 使用 smtplib 它可以设置调试级别:https://github.com/mattupstate/flask-mail/blob/master/flask_mail.py#L139 。您可以使用 MAIL_DEBUG = True DEBUG = True 来设置它。还要检查 MAIL_SUPPRESS_SEND = False TESTING = False

<在调试中,我可以看到 stdout 邮件进程:成功,失败,收件人等。



查看详情: http://pythonhosted.org/Flask-Mail/#configuring-flask-mail


All, I'm trying to setup flask-mail to send notifications to my email when a user registers. I'm getting no error messages from the script used to send the email, but nothing is actually being sent, or at least, nothing is being received.

Is there a log file which can show if an email was sent, rejected, or maybe if there was even a problem logging onto the server? How does on track this problem?

Any ideas here?

解决方案

Flask-Email use smtplib which can set debug level: https://github.com/mattupstate/flask-mail/blob/master/flask_mail.py#L139. You can set it with MAIL_DEBUG = True or DEBUG = True. Also check that MAIL_SUPPRESS_SEND = False and TESTING = False.

With debug I can see in stdout mail progress: success, fail, recipients and etc.

See details: http://pythonhosted.org/Flask-Mail/#configuring-flask-mail.

这篇关于Flask-Mail不发送邮件,没有错误报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆