Search in sources :

Example 41 with Wiser

use of org.subethamail.wiser.Wiser in project motech by motech.

the class EmailBundleIT method setUp.

@Before
public void setUp() {
    smtpServer = new Wiser(8099);
    smtpServer.start();
}
Also used : Wiser(org.subethamail.wiser.Wiser) Before(org.junit.Before)

Example 42 with Wiser

use of org.subethamail.wiser.Wiser in project tutorials by eugenp.

the class SpringBootMailIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    final int TEST_PORT = 8025;
    wiser = new Wiser(TEST_PORT);
    wiser.start();
}
Also used : Wiser(org.subethamail.wiser.Wiser) Before(org.junit.Before)

Example 43 with Wiser

use of org.subethamail.wiser.Wiser in project jbpm by kiegroup.

the class EmailDeadlinesBaseTest method setup.

public void setup() {
    final ChainedProperties props = ChainedProperties.getChainedProperties("email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false));
    wiser = new Wiser();
    wiser.setHostname(props.getProperty("mail.smtp.host", "localhost"));
    wiser.setPort(Integer.parseInt(props.getProperty("mail.smtp.port", "2345")));
    wiser.start();
    try {
        Thread.sleep(1000);
    } catch (Throwable t) {
    // Do nothing
    }
}
Also used : Wiser(org.subethamail.wiser.Wiser) ChainedProperties(org.kie.internal.utils.ChainedProperties)

Aggregations

Wiser (org.subethamail.wiser.Wiser)43 MailMessageImpl (com.outjected.email.impl.MailMessageImpl)21 Test (org.junit.Test)21 SessionConfig (com.outjected.email.api.SessionConfig)20 MimeMessage (javax.mail.internet.MimeMessage)18 EmailMessage (com.outjected.email.api.EmailMessage)17 BodyPart (javax.mail.BodyPart)15 MimeMultipart (javax.mail.internet.MimeMultipart)15 Before (org.junit.Before)9 URLAttachment (com.outjected.email.impl.attachments.URLAttachment)8 FreeMarkerTemplate (com.outjected.email.impl.templating.freemarker.FreeMarkerTemplate)6 VelocityTemplate (com.outjected.email.impl.templating.velocity.VelocityTemplate)6 BeforeClass (org.junit.BeforeClass)4 ChainedProperties (org.kie.internal.utils.ChainedProperties)4 SMTPAuthenticator (com.outjected.email.util.SMTPAuthenticator)2 File (java.io.File)2 EasyAuthenticationHandlerFactory (org.subethamail.smtp.auth.EasyAuthenticationHandlerFactory)2 SimpleMailConfig (com.outjected.email.impl.SimpleMailConfig)1 PortalContainer (org.exoplatform.container.PortalContainer)1 DefaultUserInfo (org.jbpm.services.task.identity.DefaultUserInfo)1