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


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

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值