sample IMAP and IMAP IDLE SI configuration to use with GMail
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
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-3.0.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
|
||||
http://www.springframework.org/schema/integration/mail http://www.springframework.org/schema/integration/mail/spring-integration-mail-2.0.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"
|
||||
xmlns:int="http://www.springframework.org/schema/integration"
|
||||
xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xmlns:util="http://www.springframework.org/schema/util">
|
||||
|
||||
<!--
|
||||
|
||||
IMAP and IMAP IDLE sample configuration to use with Gmail
|
||||
There is no test to back this up, just a sample config to use with your tests
|
||||
|
||||
-->
|
||||
|
||||
<int-mail:imap-idle-channel-adapter id="customAdapter"
|
||||
store-uri="imaps://[username]:[password]@imap.gmail.com/INBOX"
|
||||
channel="recieveChannel"
|
||||
auto-startup="true"
|
||||
should-delete-messages="false"
|
||||
java-mail-properties="javaMailProperties"/>
|
||||
|
||||
<int-mail:inbound-channel-adapter id="imapAdapter"
|
||||
store-uri="imaps://[username]:[password]@imap.gmail.com/INBOX"
|
||||
java-mail-properties="javaMailProperties"
|
||||
channel="recieveChannel"
|
||||
should-delete-messages="true"
|
||||
auto-startup="true">
|
||||
<int:poller max-messages-per-poll="1">
|
||||
<int:interval-trigger interval="5000"/>
|
||||
</int:poller>
|
||||
</int-mail:inbound-channel-adapter>
|
||||
|
||||
<int:channel id="recieveChannel"/>
|
||||
|
||||
<int:service-activator input-channel="recieveChannel">
|
||||
<bean class="org.springframework.integration.mail.config.GoogleTest.SampleReciever"/>
|
||||
</int:service-activator>
|
||||
|
||||
<util:properties id="javaMailProperties">
|
||||
<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
|
||||
<prop key="mail.imap.socketFactory.fallback">false</prop>
|
||||
<prop key="mail.store.protocol">imaps</prop>
|
||||
<prop key="mail.debug">false</prop>
|
||||
</util:properties>
|
||||
|
||||
<task:executor id="executor" pool-size="5"/>
|
||||
</beans>
|
||||
Reference in New Issue
Block a user