报错:smtplib.SMTPAuthenticationError: (535, b‘Error: authentication failed‘)
因为这里要的password是第三方使用邮箱时的password,所以应该是授权码而不是密码
授权码设置步骤:
1.登录163邮箱
2.进入设置,点击“开启smtp服务”
3.设置客户端授权密码 点击开启 。提示编辑短信 发送,发送就好
4.填写 并确认。
5.把登录邮件代码终端的password的值换成授权码 就可以了
python 发送邮件 smtplib.SMTPAuthenticationError: (535, b'Error: authentication failed') 以及授权码设置步骤
原文:https://www.cnblogs.com/yanwangye/p/12503030.html