1 17 package org.efs.openreports.util; 18 19 import javax.mail.PasswordAuthentication ; 20 21 public class SMTPAuthenticator extends javax.mail.Authenticator  22 { 23 private String userName; 24 private String password; 25 26 public SMTPAuthenticator(String userName, String password) 27 { 28 this.userName = userName; 29 this.password = password; 30 } 31 32 public PasswordAuthentication getPasswordAuthentication() 33 { 34 return new PasswordAuthentication (userName, password); 35 } 36 } | Popular Tags |