我正在使用 java mail api 发送邮件但遇到以下错误..
no suitable method found for getInstance(java.util,Properties,java.net.Authenticator)
这是我在java中的代码片段..
Authenticator auth = new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(userName, password.toCharArray());
}
};
Session session = Session.getInstance(properties, auth);
我在下一行收到提到的错误..
Session session = Session.getInstance(properties, auth);
请帮我 。提前致谢..