All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.service.mail.MailSenderAuthenticator Maven / Gradle / Ivy

There is a newer version: 3.6.2
Show newest version
package com.jpattern.service.mail;

import javax.mail.PasswordAuthentication;

import com.jpattern.core.util.ValueUtilExt;

/**
 * 
 * @author Francesco Cina'
 *
 * 16 Feb 2011
 */
public class MailSenderAuthenticator extends javax.mail.Authenticator {
	
	private PasswordAuthentication authentication;

	public MailSenderAuthenticator(String username, String password) {
		authentication = new PasswordAuthentication(ValueUtilExt.stringNotNull(username,""), ValueUtilExt.stringNotNull(password,""));
	}

	protected PasswordAuthentication getPasswordAuthentication() {
		return authentication;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy