骆驼IMAP端点:“ FailedToCreateRouteException ...无法解析端点:...由于:必须指定主机且不能为空”

时间:2018-08-12 17:45:51

标签: apache-camel apache-camel-mail

以下是我的POM:

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

我的端点配置来自https://camel.apache.org/mail.html样本部分:

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

这将导致:

...
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
...

但是mail.upcmail.at是主机,不是吗?我在这里想念什么?

1 个答案:

答案 0 :(得分:1)

您的帖子中有错字吗?您的uri中缺少问号(?)。 应该是: from(“ imap:// {{mail_user}} @ {{imaps_server}}?password = ...”)