Search in sources :

Example 1 with EmailSmtpConfig

use of io.kamax.mxisd.config.threepid.connector.EmailSmtpConfig in project mxisd by kamax-io.

the class EmailNotificationTest method before.

@Before
public void before() {
    EmailSmtpConfig smtpCfg = new EmailSmtpConfig();
    smtpCfg.setPort(3025);
    smtpCfg.setLogin(user);
    smtpCfg.setPassword(user);
    EmailConfig eCfg = new EmailConfig();
    eCfg.setConnector(EmailSmtpConnector.ID);
    eCfg.getIdentity().setFrom(sender);
    eCfg.getIdentity().setName(senderName);
    eCfg.getConnectors().put(EmailSmtpConnector.ID, GsonUtil.makeObj(smtpCfg));
    MxisdConfig cfg = new MxisdConfig();
    cfg.getMatrix().setDomain(domain);
    cfg.getKey().setPath(":memory:");
    cfg.getStorage().getProvider().getSqlite().setDatabase(":memory:");
    cfg.getThreepid().getMedium().put(ThreePidMedium.Email.getId(), GsonUtil.makeObj(eCfg));
    m = new Mxisd(cfg);
    m.start();
    gm = new GreenMail(ServerSetupTest.SMTP_IMAP);
    gm.start();
}
Also used : MxisdConfig(io.kamax.mxisd.config.MxisdConfig) EmailConfig(io.kamax.mxisd.config.threepid.medium.EmailConfig) GreenMail(com.icegreen.greenmail.util.GreenMail) Mxisd(io.kamax.mxisd.Mxisd) EmailSmtpConfig(io.kamax.mxisd.config.threepid.connector.EmailSmtpConfig) Before(org.junit.Before)

Aggregations

GreenMail (com.icegreen.greenmail.util.GreenMail)1 Mxisd (io.kamax.mxisd.Mxisd)1 MxisdConfig (io.kamax.mxisd.config.MxisdConfig)1 EmailSmtpConfig (io.kamax.mxisd.config.threepid.connector.EmailSmtpConfig)1 EmailConfig (io.kamax.mxisd.config.threepid.medium.EmailConfig)1 Before (org.junit.Before)1