Package org.apache.james.protocols.smtp

Examples of org.apache.james.protocols.smtp.SMTPSession


    }

    @Test
    public void testHasAddressMapping() throws Exception {
        MailAddress mailAddress = new MailAddress(USER1 + "@localhost");
        SMTPSession session = setupMockedSMTPSession(setupMockedSMTPConfiguration(), mailAddress, false);

        int rCode = handler.doRcpt(session, null, mailAddress).getResult();

        assertEquals("Not rejected", rCode, HookReturnCode.DECLINED);
    }
View Full Code Here


    }

    @Test
    public void testHasErrorMapping() throws Exception {
        MailAddress mailAddress = new MailAddress(USER2 + "@localhost");
        SMTPSession session = setupMockedSMTPSession(setupMockedSMTPConfiguration(), mailAddress, false);

        int rCode = handler.doRcpt(session, null, mailAddress).getResult();

        assertNull("Valid Error mapping", session.getAttachment("VALID_USER", State.Transaction));
        assertEquals("Error mapping", rCode, HookReturnCode.DENY);
    }
View Full Code Here

TOP

Related Classes of org.apache.james.protocols.smtp.SMTPSession

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.