【发布时间】:2021-11-01 20:19:42
【问题描述】:
from mailer import Mailer
mail = Mailer(email='my email', password='my password')
mail.send(receiver='random email', subject="test", message="Cool reset")
当我运行它时,我得到一个错误,它说
错误:不接受电子邮件和密码。
注意: 确保您允许不太安全的应用程序, 如果没有,请访问此链接: ==> https://myaccount.google.com/lesssecureapps
For More information visit this link:
==> https://support.google.com/mail/?p=BadCredentials
我已经将“允许不太安全的应用程序”设置为开启。
顺便说一句,电子邮件凭据不是我在代码中使用的实际凭据
【问题讨论】: