Hi

Try another mail server than gmail, as they have secured it and you
also need to [x] in some setting to allow imap access and whatnot.



On Fri, Jul 10, 2015 at 11:57 AM, bbenny93 <[email protected]> wrote:
> I'm totally new to Camel and I just wanted to try something simple like
> reading emails from a gmail address and put them in a folder.
> To do so I've just modified the example from the chapter1 of the /Camel in
> Action/ book, but every time I launch it I get a connection time out.
>
> My java file looks like this:
>
> package camelinaction;
>
> import org.apache.camel.CamelContext;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.impl.DefaultCamelContext;
>
>
> public class FileCopierWithCamel {
>
>     public static void main(String args[]) throws Exception {
>         // create CamelContext
>         CamelContext context = new DefaultCamelContext();
>
>         // add our route to the CamelContext
>         context.addRoutes(new RouteBuilder() {
>             public void configure() {
>
> from("imap:[email protected]&password=xxxxxx").to("file:data/outbox");
>             }
>         });
>
>         // start the route and let it do its work
>         context.start();
>         Thread.sleep(10000);
>
>         // stop the CamelContext
>         context.stop();
>     }
> }
>
> And I have added these lines to the pom.xml:
>
>      <dependency>
>        <groupId>org.apache.camel</groupId>
>        <artifactId>camel-mail</artifactId>
>        <version>2.11.0</version>
>      </dependency>
>
> Can someone tell me why it isn't working?
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Read-emails-tp5769085.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to