我无法使用django发送电子邮件

When I try to send an email with django this error appears: smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials b2sm12936529wrm.30 - gsmtp')

评论
mex
mex

If your credentials are correct and you're still facing this issue, first make sure that you've allowed less secure applications to access your mail. To do this visit https://accounts.google.com and search for less secure apps. You can enable it from there.

如果此错误仍然存​​在,请按照问题中的链接进行操作,并在步骤2中找到名为/ DisplayUnlockCaptcha的链接,它将停用并重新激活您的帐户。

当Google不信任来源时,就会发生这种情况。这只是一个临时解决方案,您可能会再次遇到该问题。因此,请停止将个人邮件用于开发目的,并获取gsuite帐户或其他任何商务邮件,例如twilio send grid

点赞
评论