Mule ESB:使用IMAP连接器从Gmail检索电子邮件 [英] Mule ESB: Retrieving email messages from Gmail using IMAP connector

查看:158
本文介绍了Mule ESB:使用IMAP连接器从Gmail检索电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Mule的新手,我试图创建一个Mule配置,通过imap从GMail帐户中发送邮件,并将它们推送到一个php脚本,该脚本处理并将它们存储在我构建的自定义CRM中。
对于初学者,我只是想将收件箱中的电子邮件转储到文本文件中,并计划从那里开始工作。



在收到新消息时通过邮箱,Mule应该接收新消息并自动处理它们。



Mule配置看起来像这样:

 < imaps:connector name =IMAPmailboxFolder =INBOXvalidateConnections =falsedoc:name =IMAP/> 
< flow name =flows1Flow1doc:name =flows1Flow1>
< / flow>

程序运行并得到这一点:

  INFO 2012-01-12 13:51:06,606 [main] org.mule.DefaultMuleContext:
************** ************************************************** ******
*应用程序:mailflow *
* OS编码:Cp1252,Mule编码:UTF-8 *
* *
*代理正在运行:*
* JMX代理*
***************************************** *****************************
INFO 2012-01-12 13:51:06,606 [main] org.mule .module.launcher.DeploymentService:
++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++
+已启动的应用程序'mailflow'+
++++++++++++++ +++++++++++++++++++++++++++ +++++++++++++++++++

然后只是无限期地坐在那里,什么都不做?!

有文档建议,因为我使用IMAPS,我需要将TLS客户端和TLS密钥存储添加到imaps连接器。我不确定这些是什么或如何使用它们,而且文档是高度专业化且难以理解的。
我也不确定这是什么问题,因为应用程序在任何时候都不会崩溃。



有没有人成功用GMail创建一个imap流程?
请帮助?!

解决方案

只需放入*,您就不会看到错误,并且仍然可以正常工作。

 < imaps:tls-client path =*storePassword =*/> 
< imaps:tls-trust-store path =*storePassword =*/>


I am new to Mule and im trying to create a Mule configuration that pulls sent emails from a GMail account via imap and pushes them to a php script that processes and stores them in a custom CRM that i've built. For starters, i'm just trying to get the inbox emails dumped into a text files and i plan to work from there.

As new messages are received by the mailbox, Mule should pick up the new messages and process them automatically.

The Mule config looks like this so far:

<imaps:connector name="IMAP" mailboxFolder="INBOX" validateConnections="false" doc:name="IMAP" />
<flow name="flows1Flow1" doc:name="flows1Flow1">
    <imaps:inbound-endpoint host="imap.gmail.com" port="993" user="[[username]]%40gmail.com" password="[[password]]" connector-ref="IMAP" doc:name="IMAP"/>
   <file:outbound-endpoint path="D:\mailflow" outputPattern="msg_#[function:date].txt" doc:name="File"/>
</flow>

The program runs and gets to this point:

    INFO  2012-01-12 13:51:06,606 [main] org.mule.DefaultMuleContext: 
    **********************************************************************
    * Application: mailflow                                     *
    * OS encoding: Cp1252, Mule encoding: UTF-8                          *
    *                                                                    *
    * Agents Running:                                                    *
    *   JMX Agent                                                        *
    **********************************************************************
    INFO  2012-01-12 13:51:06,606 [main] org.mule.module.launcher.DeploymentService: 
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    + Started app 'mailflow'                          +
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

And then just sits there indefinitely, doing nothing?!

There is documentation suggesting that because i'm using IMAPS i need to add a TLS client and TLS key store to the imaps connector. I'm not sure what these are or how to use them though and the documentation is highly specialized and hard to understand. I'm also not sure that that's what the problem is in the first place as the app doesn't crash at any point.

Has anyone had success creating an imap flow with GMail? Please Help?!

解决方案

just put in a * and you wont see the error and will still work fine.

    <imaps:tls-client path="*" storePassword="*"/>
    <imaps:tls-trust-store path="*" storePassword="*"/>

这篇关于Mule ESB:使用IMAP连接器从Gmail检索电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆