[ 
https://issues.apache.org/jira/browse/CAMEL-5980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569740#comment-13569740
 ] 

Axel Roeber commented on CAMEL-5980:
------------------------------------

I don't know the existing Camel tests (I am just using Camel ;-)) but with the 
following jUnit test I could reproduce the problem: 


        @Test
        public void testEmailFile() throws FileNotFoundException, 
MessagingException, InterruptedException {

                Properties props = System.getProperties();

                Session mailSession = Session.getDefaultInstance(props, null);

                InputStream source = new FileInputStream(new File("Exception 
Mail.eml"));
                MimeMessage message = new MimeMessage(mailSession, source);

                Endpoint endpoint = 
context.getEndpoint("pop3:localhost?mapMailMessage=false");
                Exchange exchange = 
endpoint.createExchange(ExchangePattern.InOnly);
                                                                                
                                                                                
                                                                                
                                                exchange.setIn(new 
MailMessage(message));
                exchange.getIn().getAttachments();

                template.send("direct:email-file", exchange);
                assertNull(exchange.getException());

                Thread.sleep(2000);
        }

Perhaps this helps.

                
> camel-mail - Better handle null values when extracting attachments
> ------------------------------------------------------------------
>
>                 Key: CAMEL-5980
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5980
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mail
>    Affects Versions: 2.9.0, 2.10.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: Exception Mail.eml
>
>
> See nabble
> http://camel.465427.n5.nabble.com/MailComponent-s-claim-to-handle-special-mail-multipart-formats-and-attachments-tp5724859.html
> We should see if we can fix the Camel code to handle those null data.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to