<?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 https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/mail https://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd
		http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
	xmlns:util="http://www.springframework.org/schema/util">

	<int:channel id="receiveChannel" />
	<!-- replace 'userid and 'password' with the real values -->
	<int-mail:imap-idle-channel-adapter id="customAdapter"
			store-uri="imaps://[userid]:[password]@imap.gmail.com:993/inbox"
			channel="receiveChannel"
			auto-startup="true"
			should-delete-messages="false"
			should-mark-messages-as-read="false"
			java-mail-properties="javaMailProperties"/>

	<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>

</beans>
