Flask-Mail不发送邮件,没有错误报告 [英] Flask-Mail not sending emails, no error is being reported
问题描述
我没有收到用于发送电子邮件的脚本的错误信息,但是没有发送任何信息,或者至少没有收到任何信息。
是否有一个日志文件,可以显示电子邮件是否被发送,拒绝,或者甚至有问题登录到服务器?如何跟踪这个问题?
这里的任何想法?
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屋!