Examples of MimeMessageInputStream


Examples of org.apache.james.core.MimeMessageInputStream

                            if (mailbox == null) {
                                final String error = "Mailbox for user " + user + " was not found on this server.";
                                throw new MessagingException(error);
                            }

                            mailbox.appendMessage(new MimeMessageInputStream(mail), new Date(), session, true, null);
                        } catch (IOException e) {
                            throw new MessagingException("Failed to write mail message", e);
                        } finally {
                            session.close();
                            mailboxManager.logout(session, true);
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

               
                // create inbox if not exist
                if (mailboxManager.mailboxExists(inbox, mailboxSession) == false) {
                    mailboxManager.createMailbox(inbox, mailboxSession);
                }
                mailboxManager.getMailbox(MailboxPath.inbox(username), mailboxSession).appendMessage(new MimeMessageInputStream(mail.getMessage()), new Date(), mailboxSession, true, null);
                mailboxManager.endProcessingRequest(mailboxSession);
                response = new SMTPResponse(SMTPRetCode.MAIL_OK, DSNStatus.getStatus(DSNStatus.SUCCESS,DSNStatus.CONTENT_OTHER)+" Message received");
            } catch (IOException e) {
                session.getLogger().info("Unexpected error handling DATA stream",e);
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

                if (session instanceof PooledSession) {
                    amqSession = ((PooledSession) session).getInternalSession();
                } else {
                    amqSession = (ActiveMQSession) session;
                }
                BlobMessage message = amqSession.createBlobMessage(new MimeMessageInputStream(mail.getMessage()));
                Queue queue = session.createQueue(queuename);

                producer = session.createProducer(queue);
                Iterator<String> keys = props.keySet().iterator();
                while (keys.hasNext()) {
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

                    }

                }
                if (blobMessage == null) {
                    // just use the MimeMessageInputStream which can read every MimeMessage implementation
                    blobMessage = amqSession.createBlobMessage(new MimeMessageInputStream(wrapper));
                }
           
                // store the queue name in the props
                props.put(JAMES_QUEUE_NAME, queuename);
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

                        if (mailbox == null) {
                            final String error = "Mailbox for user " + user + " was not found on this server.";
                            throw new MessagingException(error);
                        }

                        mailbox.appendMessage(new MimeMessageInputStream(mail), new Date(), session, true, null);
                    } finally {
                        session.close();
                        mailboxManager.logout(session, true);

                        // stop processing request
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

               
                // create inbox if not exist
                if (mailboxManager.mailboxExists(inbox, mailboxSession) == false) {
                    mailboxManager.createMailbox(inbox, mailboxSession);
                }
                mailboxManager.getMailbox(MailboxPath.inbox(username), mailboxSession).appendMessage(new MimeMessageInputStream(mail.getMessage()), new Date(), mailboxSession, true, null);
                mailboxManager.endProcessingRequest(mailboxSession);
                response = new SMTPResponse(SMTPRetCode.MAIL_OK, DSNStatus.getStatus(DSNStatus.SUCCESS,DSNStatus.CONTENT_OTHER)+" Message received");
           
            } catch (MessagingException e) {
                session.getLogger().info("Unexpected error handling DATA stream",e);
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

        }

        @Override
        public InputStream getMessageInputStream() throws IOException {
            try {
                return new MimeMessageInputStream(mail.getMessage());
            } catch (MessagingException e) {
                throw new IOException("Unable to get inputstream for message", e);
            }
        }
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

                        if (mailbox == null) {
                            final String error = "Mailbox for user " + user + " was not found on this server.";
                            throw new MessagingException(error);
                        }

                        mailbox.appendMessage(new MimeMessageInputStream(mail), new Date(), session, true, null);

                    } catch (MailboxException e) {
                        throw new MessagingException("Unable to access mailbox.", e);
                    } finally {
                        session.close();
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

            if (mailbox == null) {
                final String error = "Mailbox for username " + username + " was not found on this server.";
                throw new MessagingException(error);
            }

            mailbox.appendMessage(new MimeMessageInputStream(mail.getMessage()), new Date(), session, true, null);

            log("Local delivery with ToSenderFolder mailet for mail " + mail.getName() + " with sender " + sender.toString() + " in folder " + this.folder);
       
        } catch (MailboxException e) {
            throw new MessagingException("Unable to access mailbox.", e);
View Full Code Here

Examples of org.apache.james.core.MimeMessageInputStream

                }*/
                if (blobMessage == null) {
                    // just use the MimeMessageInputStream which can read every
                    // MimeMessage implementation
                    blobMessage = amqSession.createBlobMessage(new MimeMessageInputStream(mail.getMessage()));
                }
                
                   
                // store the queue name in the props
                props.put(JAMES_QUEUE_NAME, queueName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.