已生成并使用应用密码仍触发“App Password Is Required”错误的问题咨询
已生成并使用应用密码仍触发“App Password Is Required”错误的问题咨询
我的项目核心逻辑用Python编写,前端使用HTML、CSS和JS实现。目前我在使用SMTP发送验证邮件,在.env文件里配置了这些变量:
SMTP_SERVER=smtp.mail.ruSMTP_PORT=587SMTP_USERNAME=my_emailSMTP_PASSWORD=我生成的应用密码
但发送邮件时一直触发以下错误:
Attempting to send email to xxxxxxxx@gmail.com via smtp.mail.ru:587... Starting TLS... Email sending failed: (535, b'5.7.0 NEOBHODIM parol prilozheniya https://help.mail.ru/mail/security/protection/external / Application password is REQUIRED') Error occurred while sending email: 500: Failed to send verification email: (535, b'5.7.0 NEOBHODIM parol prilozheniya https://help.mail.ru/mail/security/protection/external / Application password is REQUIRED')
我已经查过官方文档,也问过ChatGPT,但都没解决问题。现在用户能正常被添加到数据库,但邮件就是发不出去,一直报这个错。
我怀疑这个问题和邮箱的应用密码有关(从错误信息来看是这样),但不确定是不是还有其他代码层面的问题需要排查?
提前感谢大家的帮助!
备注:内容来源于stack exchange,提问作者Daniel Hakobyan
相关产品推荐
相关产品推荐

