//补之前文章中的实体类
public class EmailModel extends Authenticator{
private String username;
private String pwd;
public EmailModel(String username, String pwd) {
super();
this.username = username;
this.pwd = pwd;
}
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, pwd);
}
}