use of com.icegreen.greenmail.util.ServerSetup in project books by aidanwhiteley.
the class SignUpNotificationServiceTest method setUp.
@Before
public void setUp() {
smtpServer = new GreenMail(new ServerSetup(PORT, null, "smtp"));
smtpServer.start();
}
use of com.icegreen.greenmail.util.ServerSetup in project oozie by apache.
the class TestSLAEmailEventListener method setUp.
@Before
@Override
protected void setUp() throws Exception {
super.setUp();
services = new Services();
conf = services.getConf();
conf.set(EmailActionExecutor.EMAIL_SMTP_HOST, "localhost");
conf.set(EmailActionExecutor.EMAIL_SMTP_PORT, String.valueOf(SMTP_TEST_PORT));
conf.set(EmailActionExecutor.EMAIL_SMTP_AUTH, "false");
conf.set(EmailActionExecutor.EMAIL_SMTP_USER, "");
conf.set(EmailActionExecutor.EMAIL_SMTP_PASS, "");
conf.set(EmailActionExecutor.EMAIL_SMTP_FROM, "oozie@localhost");
conf.set(SLAEmailEventListener.BLACKLIST_CACHE_TIMEOUT, "1");
conf.set(SLAEmailEventListener.BLACKLIST_FAIL_COUNT, "2");
conf.set(SLAService.CONF_ALERT_EVENTS, SLAEvent.EventStatus.START_MISS.name() + "," + SLAEvent.EventStatus.END_MISS + "," + SLAEvent.EventStatus.DURATION_MISS);
greenMail = new GreenMail(new ServerSetup(SMTP_TEST_PORT, null, "smtp"));
greenMail.start();
services.init();
slaEmailListener = new SLAEmailEventListener();
slaEmailListener.init(conf);
}
use of com.icegreen.greenmail.util.ServerSetup in project syncope by apache.
the class AbstractNotificationTaskITCase method startGreenMail.
@BeforeAll
public static void startGreenMail() {
Properties props = new Properties();
try (InputStream propStream = ExceptionMapperITCase.class.getResourceAsStream("/mail.properties")) {
props.load(propStream);
} catch (Exception e) {
LOG.error("Could not load /mail.properties", e);
}
SMTP_HOST = props.getProperty("smtpHost");
assertNotNull(SMTP_HOST);
SMTP_PORT = Integer.parseInt(props.getProperty("smtpPort"));
assertNotNull(SMTP_PORT);
ServerSetup[] config = new ServerSetup[2];
config[0] = new ServerSetup(SMTP_PORT, SMTP_HOST, ServerSetup.PROTOCOL_SMTP);
config[1] = new ServerSetup(POP3_PORT, POP3_HOST, ServerSetup.PROTOCOL_POP3);
greenMail = new GreenMail(config);
greenMail.start();
}
use of com.icegreen.greenmail.util.ServerSetup in project BroadleafCommerce by BroadleafCommerce.
the class RegisterCustomerControllerTest method setupControllerTest.
@BeforeClass
protected void setupControllerTest() {
greenMail = new GreenMail(new ServerSetup[] { new ServerSetup(30000, "127.0.0.1", ServerSetup.PROTOCOL_SMTP) });
greenMail.start();
}
use of com.icegreen.greenmail.util.ServerSetup in project BroadleafCommerce by BroadleafCommerce.
the class EmailTest method setupEmailTest.
@BeforeClass
protected void setupEmailTest() {
greenMail = new GreenMail(new ServerSetup[] { new ServerSetup(30000, "127.0.0.1", ServerSetup.PROTOCOL_SMTP) });
greenMail.start();
}
Aggregations