apache-camelapache-camel-mail

Camel IMAP endpoint: "FailedToCreateRouteException ... Failed to resolve endpoint: ... due to: host must be specified and not empty"


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?


Solution

  • 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=...")