javax.mail.AuthenticationFailedException: 530 Error: A secure connection is requiered

来源:互联网 发布:淘宝天猫禁止好评返现 编辑:程序博客网 时间:2024/05/18 18:41


6:sina没错误,但qq有错误?求解答案:将smtp.qq.com个人邮箱爱 改为smtp.exmail.qq.com企业邮箱,建议用企业邮相的主机名
javax.mail.AuthenticationFailedException: 530 Error: A secure connection is requiered(such as ssl). More information at http://service.mail.qq.com/cgi-bin/help?id=28


at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:809)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:752)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:146)
at com.yd.email.Mail2.main(Mail2.java:44)
答案:将smtp.qq.com 改为smtp.exmail.qq.com
A secure connection is requiered(such as ssl). More information at http://service.mail.qq.com/cgi-bin/help?id=28


上面回答有问题,找到qq官方的文档了
http://service.exmail.qq.com/cgi-bin/help?id=28&no=1000585&subtype=1


如果您的电子邮件客户端支持SSL,可以在设置中选择使用SSL。
 
通用配置参数:
(我们已经默认都支持这些协议,用户无需自己手动开启这些服务器与端口)
POP3/SMTP协议
接收邮件服务器:pop.exmail.qq.com ,使用SSL,端口号995
发送邮件服务器:smtp.exmail.qq.com ,使用SSL,端口号465
海外用户可使用以下服务器
接收邮件服务器:hwpop.exmail.qq.com ,使用SSL,端口号995
发送邮件服务器:hwsmtp.exmail.qq.com ,使用SSL,端口号465
 
IMAP协议
接收邮件服务器:imap.exmail.qq.com  ,使用SSL,端口号993
发送邮件服务器:smtp.exmail.qq.com ,使用SSL,端口号465
海外用户可使用以下服务器
接收邮件服务器:hwimap.exmail.qq.com ,使用SSL,端口号993
发送邮件服务器:hwsmtp.exmail.qq.com ,使用SSL,端口号465

1 0
原创粉丝点击