br.com.jhonsapp.email.configuration.mailer.MailConfigProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of email-dispatcher Show documentation
Show all versions of email-dispatcher Show documentation
Email Dispatcher is an open source project created by Jhonys Camacho and Jhonathan Camacho to facilitate the sending of emails.
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