Spring Integration IMAP - Receive from multiple email accounts -
i've managed use spring's imap mechanism.
is possible receive emails 3 different email accounts?
my xml looks this:
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:mail="http://www.springframework.org/schema/integration/mail" xmlns:int="http://www.springframework.org/schema/integration" xmlns:util="http://www.springframework.org/schema/util" 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/mail http://www.springframework.org/schema/integration/mail/spring-integration-mail-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> <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">true</prop> <prop key="mail.imaps.ssl.trust">*</prop> <!-- todo change --> </util:properties> <mail:inbound-channel-adapter id="imapadapter" store-uri="imaps://avita.nir%40gmail.com:mypass@imap.gmail.com:993/inbox" channel="recieveemailchannel" should-delete-messages="false" should-mark-messages-as-read="true" auto-startup="true" java-mail-properties="javamailproperties"> <int:poller fixed-delay="5" time-unit="seconds" /> </mail:inbound-channel-adapter> <int:channel id="recieveemailchannel"> <int:interceptors> <int:wire-tap channel="logger"/> </int:interceptors> </int:channel> <int:logging-channel-adapter id="logger" level="debug"/> <int:service-activator input-channel="recieveemailchannel" ref="messagefactory" method="receive"/> <bean id="messagefactory" class="src.com.plantaware.service.factories.messagefactory"> </bean>
is possible create imapadapter? there other way multiple accounts? possible?
thanks again!
nir
i created imapadapter#2
it works fine.
Comments
Post a Comment