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

br.com.jhonsapp.email.configuration.mailer.MailConfigProducer Maven / Gradle / Ivy

Go to download

Email Dispatcher is an open source project created by Jhonys Camacho and Jhonathan Camacho to facilitate the sending of emails.

There is a newer version: 1.0.3
Show newest version
package br.com.jhonsapp.email.configuration.mailer;

import java.util.Properties;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;

import com.outjected.email.api.SessionConfig;
import com.outjected.email.impl.SimpleMailConfig;

import br.com.jhonsapp.email.configuration.Information.ConfigureServerInformation;
import br.com.jhonsapp.email.configuration.Information.ConfigureUserInformation;

public class MailConfigProducer {

	@Produces
	@ApplicationScoped
	public SessionConfig getMailConfig() {
		
		SimpleMailConfig simpleMailConfig = this.createSimpleMailConfig();
		
		ConfigureUserInformation configureUser = new ConfigureUserInformation();		
		Properties userProperties = configureUser.configure(simpleMailConfig);

		ConfigureServerInformation configureServer = new ConfigureServerInformation();
		configureServer.configure(userProperties, simpleMailConfig);

		return simpleMailConfig;
	}

	
	private SimpleMailConfig createSimpleMailConfig(){
		return new SimpleMailConfig();
	}	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy