I'm just trying to follow some of the Mulesoft tutorials and messing around with them to see if I can figure out how things work. This particular tutorial is one that demonstrates the usage of IMAP and how to use it to get information from an email.
I'm currently using this tutorial, and it was working fine. I then made some changes to just see how things worked. I have a simple flow that looks like this:
IMAP -> Email-to-string -> Logger
And the XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:email="http://www.mulesoft.org/schema/mule/email" version="EE-3.6.0" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:context="http://www.springframework.org/schema/context" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:imap="http://www.mulesoft.org/schema/mule/imap" xmlns:imaps="http://www.mulesoft.org/schema/mule/imaps" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/imap http://www.mulesoft.org/schema/mule/imap/current/mule-imap.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
http://www.mulesoft.org/schema/mule/imaps http://www.mulesoft.org/schema/mule/imaps/current/mule-imaps.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/email http://www.mulesoft.org/schema/mule/email/current/mule-email.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd">
<imaps:connector checkFrequency="100" doc:name="IMAP" name="imapsConnector" validateConnections="true">
<imaps:tls-client path="" storePassword=""/>
<imaps:tls-trust-store path="" storePassword=""/>
</imaps:connector>
<flow name="imap-to-csvFlow1">
<imaps:inbound-endpoint connector-ref="imapsConnector" doc:name="Poll emails" host="imap.gmail.com" password="samplepass" port="993" responseTimeout="10000" user="sampleuser%40gmail.com"/>
<email:email-to-string-transformer doc:name="Email to String"/>
<logger message="#[message.payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
And the error I'm getting is:
ERROR 2015-06-04 13:34:13,706 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
java.io.IOException: Invalid keystore format
The full console log is obviously a bit more extensive but that's the first error that appears.
If you use IMAPS (as opposed to IMAP), you need to provide valid values for the TLS client and trust store.
For example:
The email transport integration tests have ready made keystores you can play with: https://github.com/mulesoft/mule/tree/mule-3.6.2/transports/email/src/test/resources
Reference: https://developer.mulesoft.com/docs/display/current/IMAP+Transport+Reference#IMAPTransportReference-ConfigurationReference