Package com.icegreen.greenmail.util

Examples of com.icegreen.greenmail.util.GreenMail


  GreenMail greenMail;

  @BeforeClass
  public void setUp() {
    greenMail = new GreenMail(ServerSetupTest.ALL);
    // uses test ports by default
    greenMail.start();
    greenMail.setUser("test1@localhost", "user1", "password");
    greenMail.setUser("test2@localhost", "user2", "password");
  }
View Full Code Here


        // Set the SMTP port to the default port used by Greenmail (3025)
        getUtil().updateObject("XWiki", "XWikiPreferences", "XWiki.XWikiPreferences", 0, "smtp_port", 3025);

        // Start GreenMail test server
        this.greenMail = new GreenMail();
        this.greenMail.start();

        String userName = RandomStringUtils.randomAlphanumeric(5);

        this.profilePage = new ProfileUserProfilePage(userName);
View Full Code Here

     */
    private GreenMail mailServer;

    public MailServer()
    {
        mailServer = new GreenMail(ServerSetupTest.ALL);
    }
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

 
  @Override
  public void setUp() {
    System.setProperty("mail.imaps.socketFactory.class", DummySSLSocketFactory.class.getCanonicalName());
    System.setProperty("mail.imaps.socketFactory.fallback", "false");
    gMail = new GreenMail();
    gMail.setUser("bfoster@google.com", "password");
    gMail.start();
    ImapsProtocol.port = gMail.getImaps().getPort();
    imapsProtocol = new ImapsProtocol();
    try {
View Full Code Here

    }

    protected 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

        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

    }   
   
    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

       
        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.start();
        if (protocol.startsWith(Pop3Connector.POP3) || protocol.startsWith(ImapConnector.IMAP))
        {
            GreenMailUtilities.storeEmail(server.getManagers().getUserManager(),
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.