【BUG】【Python】【Django】smtplib.SMTPAuthenticationError
·
BUG
由outlook向foxmail发送邮件失败:
smtplib.SMTPAuthenticationError: (535, b’5.7.139 Authentication unsuccessful, basic authentication is disabled. [SEWP216CA0059.KORP216.PROD.OUTLOOK.COM 2025-10-22T14:11:39.233Z 08D
E11572BBEB687]')
DEBUG
原因:SMTP未授权。
outlook没找到SMTP设置操作,改从qq邮箱向outlook邮箱发送邮件。
qq邮箱设置SMTP授权:

上面是已经生成授权码的,未生成的点击“授权”,发短信后会获得一个授权码,保存好。
将授权码填写到setting.py里的EMAIL_HOST_PASSWORD。
使用SMTP后,密码不填写密码,填写SMTP授权码。原因:https://blog.csdn.net/qq_45800521/article/details/153753241?sharetype=blogdetail&sharerId=153753241&sharerefer=PC&sharesource=qq_45800521&spm=1011.2480.3001.8118
更多推荐


所有评论(0)