We are trying to configure an inbound-channel-adapter to receive pop3 mail. Our configuration is below. When the application is running an error message is generated, "failure occurred while polling for mail". If we use a store uri (store-uri="pop3://mailuser:12345@mail.ignore.com/INBOX" ) instead of mail session it works as expected. We are assuming this is a configuration issue??
Code:<int-mail:inbound-channel-adapter channel="pop3Channel" should-delete-messages="true" auto-startup="true" session="mailSession" protocol="pop3"> <!-- Will poll every 10 seconds --> <int:poller fixed-rate="10000" error-channel="pop3ErrorChannel"/> </int-mail:inbound-channel-adapter> <bean id="mailSession" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass" value="javax.mail.Session" /> <property name="targetMethod" value="getInstance" /> <property name="arguments"> <list> <props> <prop key="mail.user">mailuser</prop> <prop key="mail.password">12345</prop> <prop key="mail.store.protocol">pop3</prop> <prop key="mail.transport.protocol">smtp</prop> <prop key="mail.pop3.host">mail.ignore.com</prop> <prop key="mail.pop3.port">110</prop> <prop key="mail.smtp.host">mail.ignore.com</prop> <prop key="mail.smtp.port">25</prop> <prop key="mail.from">nobody@ignore.com</prop> <prop key="mail.debug">true</prop> </props> </list> </property> </bean>


Reply With Quote
