摘要:
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()); 阅读全文