camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: CAMEL imap component: invalid provider
Date Tue, 13 Oct 2015 17:06:36 GMT
Use smtp for sending emails. eg use smtp in your <to>

On Tue, Oct 13, 2015 at 4:12 PM, zied123456 <zied.ibra@gmail.com> wrote:
>  This is the route:
>
> <route id="reading1">
>     <from uri="timer:timerName?period=50000"/>
>     <to uri="imap://server/?username=My_@mail&amp;password=My_password"/>
>     <log message="${body}"/>
>   </route>
>
>
> This is the route:
>
> <route id="reading1">
>     <from uri="timer:timerName?period=50000"/>
>     <to uri="imap://server/?username=My_@mail&amp;password=My_password"/>
>     <log message="${body}"/>
>   </route>
>
> when i run it i got this error:
>
> javax.mail.NoSuchProviderException: invalid provider
>     at javax.mail.Session.getTransport(Session.java:724)
>     at javax.mail.Session.getTransport(Session.java:668)
>     at javax.mail.Session.getTransport(Session.java:648)
>     at
> org.apache.camel.component.mail.DefaultJavaMailSender.getTransport(DefaultJavaMailSender.java:138)
>     at
> org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:110)
>     at
> org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
>     at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>     at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:157)
>     at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:304)
>     at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:152)
>     at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
>     at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
>     at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>     at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
>     at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>     at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>     at
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:165)
>     at
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:73)
>     at java.util.TimerThread.mainLoop(Unknown Source)
>     at java.util.TimerThread.run(Unknown Source)
> [ thread #0 - timer://timerName] TimerConsumer                  WARN  Error
> processing exchange. Exchange[Message: [Body is null]]. Caused by:
> [javax.mail.NoSuchProviderException - invalid provider]
>
> when i change it to :
>
> <route id="reading1">
>     <from uri="imap://server/?username=My_@mail&amp;password=My_password"/>
>     <log message="${body}"/>
>   </route>
>
> it works! it seems imap component can not be in a <to../> tag only <from
> ../> tag and in my case imap params (username and password) come from
> anothers endpoints before Imap. How can fix this problem ?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CAMEL-imap-component-invalid-provider-tp5772621.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Mime
View raw message