I am new to Mule and im trying to create a Mule configuration that sends sent emails from a GMail account via imap and pushes them to a PHP script that processes and saves them in a custom CRM that I created. To get started, I'm just trying to get inboxes of incoming messages uploaded to text files, and I plan to work from there.
When new messages are received by the mailbox, Mule should automatically receive new messages and process them.
The Mule configuration looks like this:
<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 starts 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 he just sits there endlessly, doing nothing ?!
There is documentation suggesting that since I use IMAPS, I need to add a TLS client and a TLS keystore to the imaps connector. I'm not sure what it is and how to use them, and the documentation is highly specialized and difficult to understand. I'm also not sure if the problem is that the application is not crashing at any time.
Has anyone managed to create an imap stream with GMail? Please, help?!
source share