摘要: javamail发送邮件及错误解决方法javax.mail.AuthenticationFailedException: failed to connect, no password specified? 一、继承Authenticator 二、重写protected PasswordAuthentication getPasswordAuthentication() {}方法,获取到传入的usernam,password 三、new对象的时候传入usernam,password :authenticator = new MailAuthenticator(mailInfo.getUserName(), mailInfo.getPassword()); 阅读全文
posted @ 2018-08-20 18:10 大自然的流风 阅读(10979) 评论(0) 推荐(0) 编辑