1.首先安装模块:pip install yagmail
2.发送报告:
阿里企业邮箱,smtp默认已开启,password=邮箱密码
host=smtp.mxhichina.com,其它报错!
发送邮件列表支持多个mail[,,,]
3.最后收到邮件,发送成功
4.报错:smtplib.SMTPAuthenticationError: (526, b'Authentication failure[0]')
原因自行排查:
1、服务器错误
2、用户名错误
3、用户名密码不匹配。
我这是因为password错误,配好就解决了。
参考链接:https://juejin.cn/post/6877463852523454478