properties.setProperty("smtpUser", (String) componentContext.getProperties().get(MAIL_SMTP_USER));
properties.setProperty("smtpPassword", (String) componentContext.getProperties().get(MAIL_SMTP_PASSWORD));
}
public Session getSession() {
Authenticator auth = new Authenticator() {
@Override
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(properties.
getProperty("smtpUser"),
properties.getProperty("smtpPassword"));