学习flask-mail 利用Gmail出错的总结

在使用Flask-Mail通过Gmail发送邮件时遇到障碍,原因是Google的安全设置阻止了不安全应用的登录尝试。参照Google支持页面的提示,需在账户设置中开启'允许不够安全的应用'选项,启用这一设置后,问题得到解决。
利用flask Gmail发送邮件  一直出问题 因为账号密码都是对的
所以 到处搜索发现
然后在stack overflow 上面发现了一个回答 
Your code looks correct. Try logging in through your browser and if you are able to access your account come back and try your code again. Just make sure that you have typed your username and password correct

EDIT: Google blocks sign-in attempts from apps which do not use modern security standards (mentioned on their support page). You can however, turn on/off this safety feature by going to the link below:

Go to this link and select Turn On
https://www.google.com/settings/security/lesssecureapps

允许不够安全的应用

问题出现在了 这个Google的安全设置上面没有打开 

打开了之后就解决了


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值