Package org.apache.james.protocols.smtp

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


     * @param session SMTP session object
     * @param argument the argument passed in with the command by the SMTP client
     */
    @SuppressWarnings("unchecked")
    protected SMTPResponse doDATA(SMTPSession session, String argument) {
        MailEnvelope env = createEnvelope(session, (MailAddress) session.getState().get(SMTPSession.SENDER), new ArrayList<MailAddress>((Collection)session.getState().get(SMTPSession.RCPT_LIST)));
        session.getState().put(MAILENV, env);
        session.pushLineHandler(lineHandler);
       
        return new SMTPResponse(SMTPRetCode.DATA_READY, "Ok Send data ending with <CRLF>.<CRLF>");
    }
View Full Code Here


     * @param session SMTP session object
     * @param argument the argument passed in with the command by the SMTP client
     */
    @SuppressWarnings("unchecked")
    protected Response doDATA(SMTPSession session, String argument) {
        MailEnvelope env = createEnvelope(session, (MailAddress) session.getState().get(SMTPSession.SENDER), new ArrayList<MailAddress>((Collection<MailAddress>)session.getState().get(SMTPSession.RCPT_LIST)));
        session.getState().put(MAILENV, env);
        session.pushLineHandler(lineHandler);
       
        return new SMTPResponse(SMTPRetCode.DATA_READY, "Ok Send data ending with <CRLF>.<CRLF>");
    }
View Full Code Here

            client.disconnect();

            Iterator<MailEnvelope> queued = deliverHook.getDelivered().iterator();
            assertTrue(queued.hasNext());
           
            MailEnvelope env = queued.next();
            checkEnvelope(env, SENDER, Arrays.asList(RCPT1, RCPT2), MSG1);
            assertFalse(queued.hasNext());

        } finally {
            if (server != null) {
View Full Code Here

            client.disconnect();

            Iterator<MailEnvelope> queued = deliverHook.getDelivered().iterator();
            assertTrue(queued.hasNext());
           
            MailEnvelope env = queued.next();
            checkEnvelope(env, SENDER, Arrays.asList(RCPT1, RCPT2), MSG1);
            assertFalse(queued.hasNext());

        } finally {
            if (server != null) {
View Full Code Here

     * @param session SMTP session object
     * @param argument the argument passed in with the command by the SMTP client
     */
    @SuppressWarnings("unchecked")
    protected Response doDATA(SMTPSession session, String argument) {
        MailEnvelope env = createEnvelope(session, (MailAddress) session.getAttachment(SMTPSession.SENDER,ProtocolSession.State.Transaction), new ArrayList<MailAddress>((Collection<MailAddress>)session.getAttachment(SMTPSession.RCPT_LIST,ProtocolSession.State.Transaction)));
        session.setAttachment(MAILENV, env,ProtocolSession.State.Transaction);
        session.pushLineHandler(lineHandler);
       
        return DATA_READY;
    }
View Full Code Here

TOP

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

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.