折腾:
【已解决】Python中smtp如何发送多个收件人地址且带名字的且可以被格式化
期间,已经开启了QQ邮箱中的smtp的服务了。但是用代码发邮件,结果用25端口和smtp.qq.com去发送,结果出错:
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (530, ‘Error: A secure connection is requiered(such as ssl). More information at http://service.mail.qq.com/cgi-bin/help?id=28‘)
参考qq的:
常用邮件客户端软件设置_QQ邮箱帮助中心
http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=371
如何使用IMAP服务?_QQ邮箱帮助中心
http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=331
端口换成465试试
结果半天都连不上
smtpObj = smtplib.SMTP(smtpServer, smtpPort)
直接就挂掉了,没反应:
smtpObj = smtplib.SMTP(smtpServer, smtpPort)
接着错误又变成:
【已解决】python中smtp发送qq邮件出错:smtplib.SMTPAuthenticationError 530 Must issue a STARTTLS command first
转载请注明:在路上 » 【已解决】python中smtp用qq发送邮件出错:smtplib.SMTPAuthenticationError 530 Error A secure connection is requiered