/* * MyAuthenticator.java * * Created on den 12 september 2001, 15:49 */ package ip1.u7.b; /** Se javax.mail.Authenticator * * @author Henrik Johansson, DS80 * @version ht2001 */ public class MyAuthenticator extends javax.mail.Authenticator { private String username; private String password; /** Creates new MyAuthenticator */ public MyAuthenticator(String username, String password) { this.username = username; this.password = password; } protected javax.mail.PasswordAuthentication getPasswordAuthentication() { MyAuthenticatorDialog dialog = new MyAuthenticatorDialog(username, password); javax.mail.PasswordAuthentication auth = dialog.getPasswordAuthentication(); dialog.dispose(); return auth; } }