我们有一个MDB,它从电子邮件帐户发送电子邮件,MDB实现MailListener接口,我正在寻找通过SSL启用POP3的属性
我在xml中有这样的设置,如下所示,我为端口和SSL提供了一个aditional activation-config-property ...我用Google搜索但没有成功,有人可以帮忙吗?
我正在使用jboss5.1,seam2
<message-driven>
<description>An MDB that accepts mail messages</description>
<ejb-name>MailListenerMDB</ejb-name>
<ejb-class>si.arctur.fourPmServices.scheduleJobs.emailListener.MailListenerMDB</ejb-class>
<activation-config>
<activation-config-property>
<activation-config-property-name>userName</activation-config-property-name>
<activation-config-property-value>******</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>password</activation-config-property-name>
<activation-config-property-value>********</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>pollingInterval</activation-config-property-name>
<activation-config-property-value>15000</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>mailServer</activation-config-property-name>
<activation-config-property-value>*****</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>mailFolder</activation-config-property-name>
<activation-config-property-value>INBOX</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>storeProtocol</activation-config-property-name>
<activation-config-property-value>pop3</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
答案 0 :(得分:1)
我找到了你需要指定那些属性的解决方案
<activation-config-property>
<activation-config-property-name>storeProtocol</activation-config-property-name>
<activation-config-property-value>pop3s</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>port</activation-config-property-name>
<activation-config-property-value>995</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>starttls</activation-config-property-name>
<activation-config-property-value>true</activation-config-property-value>
</activation-config-property>
请特别注意POP3S而非POP3
的协议