【发布时间】:2012-05-02 14:46:18
【问题描述】:
我想使用 Spring Integration Mail 通过 IMAP 连接到 Microsoft Exchange 2010。 我的问题是连接字符串到底长什么样。
假设:
domain=earth
user=jdoe
email=jon.doe@earth.com
Folder=inbox
据我所知,MS Exchange 仅支持 imap 进行连接。
我的 Spring 集成配置如下所示:
<util:properties id="javaMailProperties">
<prop key="mail.imaps.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
<prop key="mail.imaps.socketFactory.fallback">false</prop>
<prop key="mail.store.protocol">imaps</prop>
<prop key="mail.debug">true</prop>
</util:properties>
<mail:inbound-channel-adapter id="imapAdapter"
store-uri="imaps://earth/jdoe/jon.doe:jdoespw@example.mailhost.com/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:service-activator input-channel="recieveEmailChannel"
ref="mailReceiver" method="receive" />
<bean id="mailReceiver"
class="com.earth.MailReceiver" />
【问题讨论】:
标签: spring exchange-server spring-integration