I have this code. Im trying to pass a user id and password from a constructor parm into a method but it's losing scope or something.
Does anyone see anything
public RPGMail() { /* default constructor if no server authentication
}
public RPGMail(String Name, String pw, String auth) { /constuctor with userid and pasword
this.userName = Name;
this.passWord = pw;
this.smtpAuth = auth;
}
System.out.println("user name:" + this.userName);
System.out.println("pass word:" + this.passWord);
final String un = this.userName;
final String pw = this.passWord;
Session session = Session.getInstance(systemProperty,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(un, pw);
}
}
);
Does anyone see anything
public RPGMail() { /* default constructor if no server authentication
}
public RPGMail(String Name, String pw, String auth) { /constuctor with userid and pasword
this.userName = Name;
this.passWord = pw;
this.smtpAuth = auth;
}
System.out.println("user name:" + this.userName);
System.out.println("pass word:" + this.passWord);
final String un = this.userName;
final String pw = this.passWord;
Session session = Session.getInstance(systemProperty,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(un, pw);
}
}
);