Forward mail via camel

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Forward mail via camel

pvunckx
Hi,

 

I'm trying to forward an incoming mail from mailbox 1 to mailbox 2.


 

I thought it was just this:

from
("imaps://imap.gmail.com?username=[hidden email]&password=abc&consumer.delay=
30000")

                .to("smtp://myhost@to=[hidden email]");

 

But I'm getting always the following error:

javax.mail.MessagingException: Missing start boundary

 

Also when I'm composing the message via the exchange I'm getting the same
error...

 

Thx in advance!

Pieter

Reply | Threaded
Open this post in threaded view
|

Re: Forward mail via camel

Charles Moulliard
Hi,

Can you posr the full stack trace please ?

Regards,

Charles

On 12/07/12 16:01, Pieter Vunckx wrote:

> Hi,
>
>
>
> I'm trying to forward an incoming mail from mailbox 1 to mailbox 2.
>
>
>
>
> I thought it was just this:
>
> from
> ("imaps://imap.gmail.com?username=[hidden email]&password=abc&consumer.delay=
> 30000")
>
>                  .to("smtp://myhost@to=[hidden email]");
>
>
>
> But I'm getting always the following error:
>
> javax.mail.MessagingException: Missing start boundary
>
>
>
> Also when I'm composing the message via the exchange I'm getting the same
> error...
>
>
>
> Thx in advance!
>
> Pieter
>
>
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Forward mail via camel

Willem.Jiang
Administrator
In reply to this post by pvunckx
What's your message looks like?
Do you have attachments to send with the mail?

On 7/12/12 10:01 PM, Pieter Vunckx wrote:

> Hi,
>
>
>
> I'm trying to forward an incoming mail from mailbox 1 to mailbox 2.
>
>
>
>
> I thought it was just this:
>
> from
> ("imaps://imap.gmail.com?username=[hidden email]&password=abc&consumer.delay=
> 30000")
>
>                  .to("smtp://myhost@to=[hidden email]");
>
>
>
> But I'm getting always the following error:
>
> javax.mail.MessagingException: Missing start boundary
>
>
>
> Also when I'm composing the message via the exchange I'm getting the same
> error...
>
>
>
> Thx in advance!
>
> Pieter
>
>


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Reply | Threaded
Open this post in threaded view
|

Re: Forward mail via camel

pvunckx
Hi Charles, Hi Willem,

It's a HTML mail with or without attachments.
This is the stacktrace:

2012-07-16 16:46:44,972 [/imap.gmail.com] DEBUG DefaultComponent               -            -            - Creating endpoint uri=[smtp://195.238.5.128?to=abc%40xyz.be], path=[195.238.5.128], parameters=[{to=abc@xyz.be}]
2012-07-16 16:46:44,974 [/imap.gmail.com] DEBUG DefaultCamelContext            -            -            - smtp://195.238.5.128?to=abc%40xyz.be converted to endpoint: Endpoint[smtp://195.238.5.128?to=abc@xyz.be] by component: org.apache.camel.component.mail.MailComponent@1b59d510
2012-07-16 16:46:44,980 [/imap.gmail.com] DEBUG MailProducer                   -            -            - Starting producer: Producer[smtp://195.238.5.128?to=abc@xyz.be]
2012-07-16 16:46:45,307 [/imap.gmail.com] DEBUG MailProducer                   -            -            - Sending MimeMessage: messageNumber=[0], from=[User1 <efg@xyz.be>], to=[mailbox@gmail.com], subject=[HTML - geen afbeeldingen - 2 bijlages 2012/00123], sentDate=[5-jul-2012 13:37:45]
2012-07-16 16:46:45,318 [/imap.gmail.com] DEBUG DefaultJavaMailSender          -            -            - Connecting to 195.238.5.128:25
2012-07-16 16:46:45,374 [/imap.gmail.com] DEBUG DefaultErrorHandler            -            -            - Failed delivery for (MessageId: ID-AB00W363-65516-1342449999429-0-1 on ExchangeId: ID-AB00W363-65516-1342449999429-0-2). On delivery attempt: 0 caught: javax.mail.MessagingException: Missing start boundary
2012-07-16 16:46:45,377 [/imap.gmail.com] WARN  MailConsumer                   -            -            - Exchange failed, so rolling back message status: Exchange[MailMessage: messageNumber=[8], from=[User1 <efg@xyz.be>], to=[mailbox@gmail.com], subject=[HTML - geen afbeeldingen - 2 bijlages 2012/00123], sentDate=[5-jul-2012 13:37:45], receivedDate=[5-jul-2012 13:37:45]]
javax.mail.MessagingException: Missing start boundary
        at javax.mail.internet.MimeMultipart.parsebm(MimeMultipart.java:882)
        at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:503)
        at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:417)
        at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1345)
        at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1021)
        at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:419)
        at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1345)
        at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2106)
        at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2074)
        at org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:118)
        at org.apache.camel.component.mail.MailProducer.process(MailProducer.java:49)
        at be.axi.fo.wesp.route.ForwardRoute$1.process(ForwardRoute.java:33)
        at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)
        at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:304)
        at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
        at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:50)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
        at org.apache.camel.component.mail.MailConsumer.processExchange(MailConsumer.java:296)
        at org.apache.camel.component.mail.MailConsumer.processBatch(MailConsumer.java:199)
        at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:121)
        at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)
        at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
        at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)