SMTPAuthenticationError 535 Error(关键词:flask/bug)
来源:互联网 发布:linux 新建数据库实例 编辑:程序博客网 时间:2024/06/02 02:13
报错信息简略版:
SMTPAuthenticationError: (535, 'Error: \xc7\xeb\xca\xb9\xd3\xc3\xca\xda\xc8\xa8\xc2\xeb\xb5\xc7\xc2\xbc\xa1\xa3\xcf\xea\xc7\xe9\xc7\xeb\xbf\xb4: http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256')
报错信息完整版:
(venv_flask_henry) henry@henry-virtual-machine:~/dev/flask_henry$ python hello.py shell>>> from flask_mail import Message>>> from hello import mail>>> msg = Message('test subject', sender='331243543@qq.com', recipients=['mailhenry@hotmail.com'])>>> msg.body = 'text body'>>> msg.html = '<b>HTML</b> body'>>> with app.app_context():... mail.send(msg)... Traceback (most recent call last): File "<console>", line 2, in <module> File "/home/henry/dev/flask_henry/venv_flask_henry/local/lib/python2.7/site-packages/flask_mail.py", line 491, in send with self.connect() as connection: File "/home/henry/dev/flask_henry/venv_flask_henry/local/lib/python2.7/site-packages/flask_mail.py", line 144, in __enter__ self.host = self.configure_host() File "/home/henry/dev/flask_henry/venv_flask_henry/local/lib/python2.7/site-packages/flask_mail.py", line 165, in configure_host host.login(self.mail.username, self.mail.password) File "/usr/lib/python2.7/smtplib.py", line 622, in login raise SMTPAuthenticationError(code, resp)SMTPAuthenticationError: (535, 'Error: \xc7\xeb\xca\xb9\xd3\xc3\xca\xda\xc8\xa8\xc2\xeb\xb5\xc7\xc2\xbc\xa1\xa3\xcf\xea\xc7\xe9\xc7\xeb\xbf\xb4: http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256')
根据互联网上搜到的:
Flask发送邮件
和报错信息中给的链接:
http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256’
原因就是,应该是授权码,而不是普通的邮箱密码。
参考文献:
1.Flask发送邮件
2.什么是授权码,它又是如何设置?
阅读全文
0 0
- SMTPAuthenticationError 535 Error(关键词:flask/bug)
- FSADeprecationWarning(关键词:Web开发/Flask/bug)
- bash: syntax error near unexpected token `newline'(关键词:flask/bug)
- NameError: name 'app' is not defined(关键词:flask/bug)
- Web页面显示{ wtf.quick_form() }(关键词:flask/bug)
- UndefinedError: parameter 'form' was not provided(关键词:flask/bug)
- OSError: [Errno 98] Address already in use(关键词:flask/bug)
- NameError: global name 'render_template' is not defined(关键词:flask/bug)
- NameError: name 'db' is not defined、NameError: name 'User' is not defined(关键词:flask/bug)
- (sqlite3.OperationalError) no such table: users(关键词:Web开发/Flask/数据库/SQLite/bug)
- BuildError: Could not build url for endpoint 'auth.register'(关键词:Web开发/Flask/bug)
- Web页面未完全渲染:content部分未渲染,与navbar渲染效果相同(关键词:flask/bug)
- 《Flask Web开发》读书笔记(0)目录(关键词:)
- 《Flask Web开发》读书笔记(1)第1章安装(关键词:Web开发/Flask)
- 《Flask Web开发》读书笔记(3)第1章安装(关键词:Web开发/Flask)
- 《Flask Web开发》读书笔记(5)第5章数据库(关键词:Web开发/Flask/数据库)
- 《Flask Web开发》读书笔记(6)第6章电子邮件(关键词:Web开发/Flask/电子邮件)
- Django-SMTPAuthenticationError
- 对话联发科游人杰:智能音箱已跨过鸿沟进入快速普及期
- 英伟达人工智能大讲堂系列沙龙12月5日开启(内有赠票)
- Cannot add or update a child row: a foreign key constraint fails 无法添加外键
- Android 动画 笔记
- 【Linux】vim的使用
- SMTPAuthenticationError 535 Error(关键词:flask/bug)
- 摩拜表态与ofo合并没兴趣 迅雷“内讧”股价大跌超11%
- 分享一个定时自动备份oracle数据库的脚本
- BOOK
- Android 判断某个界面是否在前台
- thinkPHP命令行
- Unity3D 片元NDC空间z值(ZBuffer)转View空间z值,公式推导
- poj2386
- css float属性