The following is in my POM:

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-mail</artifactId>
        <version>2.22.0<version>
    </dependency>

My endpoint configuration derived from https://camel.apache.org/mail.html, Samples section:

    ...
    from("imap://{{mail_user}}@{{imaps_server}} password={{mail_password}}&unseen=true&consumer.delay={{poll_interval}}")
    ...

Which results in:

...
Exception in thread "main" org.apache.camel.FailedToCreateRouteException:
Failed to create route route1: Route(route1)[[From[imap://{{mail_user}}@{{imaps_server}} pa...
because of Failed to resolve endpoint:
imap://********@mail.upcmail.at%20password=********&unseen=true&consumer.delay=10000
due to: host must be specified and not empty
...

but mail.upcmail.at ist the host, isn't it? What am I missing here?

2

There are 2 best solutions below

1
On BEST ANSWER

Is it a typo in your post ? The question mark (?) Is missing in your uri. This should be: from("imap://{{mail_user}}@{{imaps_server}}?password=...")

0
On

This works for me:

    @Override
  public void configure() throws Exception {
    from("imaps://[email protected]&password=AppPassword&unseen=true&delay=6000")    
    .to("log:newmail");
  }