最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】python中smtp用qq发送邮件出错:smtplib.SMTPAuthenticationError 530 Error A secure connection is requiered

Python crifan 4713浏览 0评论

折腾:

【已解决】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

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.296 seconds, using 22.14MB memory