Package org.apache.james.protocols.smtp

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


       
        return new SMTPResponse(SMTPRetCode.DATA_READY, "Ok Send data ending with <CRLF>.<CRLF>");
    }
   
    protected MailEnvelope createEnvelope(SMTPSession session, MailAddress sender, List<MailAddress> recipients) {
        MailEnvelopeImpl env = new MailEnvelopeImpl();
        env.setRecipients(recipients);
        env.setSender(sender);
        return env;
    }
View Full Code Here


    /*
     * (non-Javadoc)
     * @see org.apache.james.smtpserver.protocol.core.DataLineFilter#onLine(org.apache.james.smtpserver.protocol.SMTPSession, byte[], org.apache.james.api.protocol.LineHandler)
     */
    public Response onLine(final SMTPSession session, byte[] line, LineHandler<SMTPSession> next) {
        MailEnvelopeImpl env = (MailEnvelopeImpl) session.getState().get(DataCmdHandler.MAILENV);
        OutputStream out = env.getMessageOutputStream();
        try {
            // 46 is "."
            // Stream terminated
            if (line.length == 3 && line[0] == 46) {
                out.flush();
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 SMTPResponse doDATA(SMTPSession session, String argument) {
        MailEnvelopeImpl env = new MailEnvelopeImpl();
        env.setRecipients(new ArrayList<MailAddress>((Collection)session.getState().get(SMTPSession.RCPT_LIST)));
        env.setSender((MailAddress) session.getState().get(SMTPSession.SENDER));
        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

    /*
     * (non-Javadoc)
     * @see org.apache.james.smtpserver.protocol.core.DataLineFilter#onLine(org.apache.james.smtpserver.protocol.SMTPSession, byte[], org.apache.james.api.protocol.LineHandler)
     */
    public void onLine(SMTPSession session, byte[] line, LineHandler<SMTPSession> next) {
        MailEnvelopeImpl env = (MailEnvelopeImpl) session.getState().get(DataCmdHandler.MAILENV);
        OutputStream out = env.getMessageOutputStream();
        try {
            // 46 is "."
            // Stream terminated
            if (line.length == 3 && line[0] == 46) {
                out.flush();
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 SMTPResponse doDATA(SMTPSession session, String argument) {
        MailEnvelopeImpl env = new MailEnvelopeImpl();
        env.setRecipients(new ArrayList<MailAddress>((Collection)session.getState().get(SMTPSession.RCPT_LIST)));
        env.setSender((MailAddress) session.getState().get(SMTPSession.SENDER));
        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

       
        return new SMTPResponse(SMTPRetCode.DATA_READY, "Ok Send data ending with <CRLF>.<CRLF>");
    }
   
    protected MailEnvelope createEnvelope(SMTPSession session, MailAddress sender, List<MailAddress> recipients) {
        MailEnvelopeImpl env = new MailEnvelopeImpl();
        env.setRecipients(recipients);
        env.setSender(sender);
        return env;
    }
View Full Code Here

    /**
     * @see org.apache.james.protocols.smtp.core.DataLineFilter#onLine(SMTPSession, byte[], LineHandler)
     */
    public Response onLine(final SMTPSession session, byte[] line, LineHandler<SMTPSession> next) {
        MailEnvelopeImpl env = (MailEnvelopeImpl) session.getState().get(DataCmdHandler.MAILENV);
        OutputStream out = env.getMessageOutputStream();
        try {
            // 46 is "."
            // Stream terminated
            if (line.length == 3 && line[0] == 46) {
                out.flush();
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 SMTPResponse doDATA(SMTPSession session, String argument) {
        MailEnvelopeImpl env = new MailEnvelopeImpl();
        env.setRecipients(new ArrayList<MailAddress>((Collection)session.getState().get(SMTPSession.RCPT_LIST)));
        env.setSender((MailAddress) session.getState().get(SMTPSession.SENDER));
        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

    /*
     * (non-Javadoc)
     * @see org.apache.james.smtpserver.protocol.core.DataLineFilter#onLine(org.apache.james.smtpserver.protocol.SMTPSession, byte[], org.apache.james.api.protocol.LineHandler)
     */
    public void onLine(SMTPSession session, byte[] line, LineHandler<SMTPSession> next) {
        MailEnvelopeImpl env = (MailEnvelopeImpl) session.getState().get(DataCmdHandler.MAILENV);
        OutputStream out = env.getMessageOutputStream();
        try {
            // 46 is "."
            // Stream terminated
            if (line.length == 3 && line[0] == 46) {
                out.flush();
View Full Code Here

    /*
     * (non-Javadoc)
     * @see org.apache.james.protocols.smtp.core.DataLineFilter#onLine(org.apache.james.protocols.smtp.SMTPSession, java.nio.ByteBuffer, org.apache.james.protocols.api.handler.LineHandler)
     */
    public Response onLine(final SMTPSession session, ByteBuffer line, LineHandler<SMTPSession> next) {
        MailEnvelopeImpl env = (MailEnvelopeImpl) session.getAttachment(DataCmdHandler.MAILENV, ProtocolSession.State.Transaction);
        OutputStream out = env.getMessageOutputStream();
        try {
            // 46 is "."
            // Stream terminated           
            int c = line.get();
            if (line.remaining() == 2 && c== 46) {
View Full Code Here

TOP

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

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.