Package com.icegreen.greenmail.util

Examples of com.icegreen.greenmail.util.ServerSetup


    private NotificationJob notificationJob;

    @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


    private NotificationManager notificationManager;

    @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

    }

    private ServerSetup newServerSetup(int port, String protocol)
    {
        logger.debug("Server for " + protocol + " will be on port " + port);
        return new ServerSetup(port, null, protocol);
    }
View Full Code Here

        }
    }

    private ServerSetup[] getSetups()
    {
        return new ServerSetup[]{new ServerSetup(port, null, protocol)};
    }
View Full Code Here

        startGreenmailServer();
    }   
   
    private void startGreenmailServer() throws Exception
    {
        ServerSetup setup = new ServerSetup(PORT, null, 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

    private void startServer() throws Exception
    {
        logger.debug("starting server on port " + port);
       
        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);
View Full Code Here

    private NotificationManager notificationManager;

    @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

    private NotificationManager notificationManager;

    @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

    private NotificationJob notificationJob;

    @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

     * @return An array of {@link ServerSetup} used to configure the embedded Greenmail server.
     */
    private ServerSetup[] getServerSetups() {
        if (isUseSSL()) {
            return new ServerSetup[]{
                    new ServerSetup(DEFAULT_SMTPS_PORT + getPortOffset(), null, ServerSetup.PROTOCOL_SMTPS),
                    new ServerSetup(DEFAULT_POP3S_PORT + getPortOffset(), null, ServerSetup.PROTOCOL_POP3S),
                    new ServerSetup(DEFAULT_IMAPS_PORT + getPortOffset(), null, ServerSetup.PROTOCOL_IMAPS)
            };
        } else {
            return new ServerSetup[]{
                    new ServerSetup(DEFAULT_SMTP_PORT + getPortOffset(), null, ServerSetup.PROTOCOL_SMTP),
                    new ServerSetup(DEFAULT_POP3_PORT + getPortOffset(), null, ServerSetup.PROTOCOL_POP3),
                    new ServerSetup(DEFAULT_IMAP_PORT + getPortOffset(), null, ServerSetup.PROTOCOL_IMAP)
            };
        }
    }
View Full Code Here

TOP

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

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.