Package com.icegreen.greenmail.util

Examples of com.icegreen.greenmail.util.GreenMail


    @BeforeClass
    public static void startGreenMail() {
        ServerSetup[] config = new ServerSetup[2];
        config[0] = new ServerSetup(smtpPort, smtpHost, ServerSetup.PROTOCOL_SMTP);
        config[1] = new ServerSetup(pop3Port, pop3Host, ServerSetup.PROTOCOL_POP3);
        greenMail = new GreenMail(config);
        greenMail.setUser(mailAddress, mailPassword);
        greenMail.start();
    }
View Full Code Here


    @BeforeClass
    public static void startGreenMail() {
        ServerSetup[] config = new ServerSetup[2];
        config[0] = new ServerSetup(smtpPort, smtpHost, ServerSetup.PROTOCOL_SMTP);
        config[1] = new ServerSetup(pop3Port, pop3Host, ServerSetup.PROTOCOL_POP3);
        greenMail = new GreenMail(config);
        greenMail.setUser(mailAddress, mailPassword);
        greenMail.start();
    }
View Full Code Here

    @BeforeClass
    public static void startGreenMail() {
        ServerSetup[] config = new ServerSetup[2];
        config[0] = new ServerSetup(smtpPort, smtpHost, ServerSetup.PROTOCOL_SMTP);
        config[1] = new ServerSetup(pop3Port, pop3Host, ServerSetup.PROTOCOL_POP3);
        greenMail = new GreenMail(config);
        greenMail.setUser(mailAddress, mailPassword);
        greenMail.start();
    }
View Full Code Here

     * @param logger Used to log error messages.
     */
    public void start(final Logger logger) {
        logInfo(logger, "com.btmatthews.maven.plugin.emailserver.greenmail.starting");
        final ServerSetup[] serverSetups = getServerSetups();
        greenMail = new GreenMail(serverSetups);
        final Mailbox[] mailboxes = getMailboxes();
        if (mailboxes != null) {
            for (final Mailbox mailbox : getMailboxes()) {
                if (mailbox.isValid()) {
                    greenMail.setUser(mailbox.getEmail(), mailbox.getLogin(), mailbox.getPassword());
View Full Code Here

    @BeforeClass
    public static void startGreenMail() {
        ServerSetup[] config = new ServerSetup[2];
        config[0] = new ServerSetup(smtpPort, smtpHost, ServerSetup.PROTOCOL_SMTP);
        config[1] = new ServerSetup(pop3Port, pop3Host, ServerSetup.PROTOCOL_POP3);
        greenMail = new GreenMail(config);
        greenMail.setUser(mailAddress, mailPassword);
        greenMail.start();
    }
View Full Code Here

        assertEquals(1, servers.getReceivedMessages().length);
    }

    private synchronized void startServers() throws Exception
    {
        servers = new GreenMail(getSetups());
        GreenMailUtilities.robustStartup(servers, LOCALHOST, port, START_ATTEMPTS, TEST_ATTEMPTS, STARTUP_PERIOD_MS);
        if (initialEmail)
        {
            storeEmail();
        }
View Full Code Here

    }

    public void startServers(List<Integer> list) throws Exception
    {
        logger.info("Starting mail servers");
        servers = new GreenMail(getSetups(list));
        servers.start();
        Thread.sleep(STARTUP_PERIOD_MS);
    }
View Full Code Here

        setup = new ServerSetup(port, null, protocol);
        if(addSmtp)
        {
            smtpSetup = new ServerSetup(smtpPort, null, "smtp");
            server = new GreenMail(new ServerSetup[]{setup, smtpSetup});
        }
        else
        {
            server = new GreenMail(setup);
        }

        server.getManagers().getUserManager().createUser(email, user, password);
        GreenMailUser gmUser = server.getManagers().getUserManager().getUser(user);
        assert null != gmUser;
View Full Code Here

    }

    private void startGreenmailServer() throws Exception
    {
        ServerSetup setup = new ServerSetup(PORT, "localhost", ImapConnector.IMAP);
        server = new GreenMail(setup);
        server.start();
        GreenMailUtilities.storeEmail(server.getManagers().getUserManager(), EMAIL, USER, PASSWORD,
            GreenMailUtilities.toMessage(MESSAGE, EMAIL, null));
    }
View Full Code Here

    GreenMail server;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        server = new GreenMail();
        server.start();
    }
View Full Code Here

TOP

Related Classes of com.icegreen.greenmail.util.GreenMail

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.