Friday, 9 October 2015

Mule IMAP Connector

Mule IMAP Connector

below flow is used to connect to the mail server to read email messages.




<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:imaps="http://www.mulesoft.org/schema/mule/imaps"
xmlns:imap="http://www.mulesoft.org/schema/mule/imap" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="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/imaps http://www.mulesoft.org/schema/mule/imaps/current/mule-imaps.xsd
http://www.mulesoft.org/schema/mule/imap http://www.mulesoft.org/schema/mule/imap/current/mule-imap.xsd">

 <imaps:connector doc:name="IMAP" name="imapsConnector"
validateConnections="true" deleteReadMessages="false" checkFrequency="10">
 <imaps:tls-client path="*" storePassword="*" />
 <imaps:tls-trust-store path="*" storePassword="*" />
 </imaps:connector>
 <flow name="imaptestFlow">
 <imaps:inbound-endpoint host="imap.gmail.com"
port="993" user="username%40domainname.com" password="password"
connector-ref="imapsConnector" responseTimeout="10000" doc:name="IMAP" />
 <logger level="INFO" doc:name="Logger" />
 </flow>
</mule>