2015-11-17 42 views
0

我剛剛安裝了WAS Liberty 8.5.5.7,因爲我正在爲GlassFish 4環境的當前部署和配置投影進行轉換爲Liberty。WAS Liberty 8.5.5.7是否支持郵件資源配置?

glassfish項目在其域配置中配置了一個<mail-resource>,該應用程序利用該配置發送外發電子郵件。

我希望WAS Liberty支持這樣的配置,任何人都可以澄清 ,因爲我還沒有找到任何此類文檔?

回答

1

WAS Liberty 8.5.5.6包含對Java EE7(包括JavaMail 1.5)的完全支持。

WAS Liberty中沒有<mail-resource>元素(它可能是某些Glassfish特定的配置元素,它不是spec-standard)。

相反,你可以這樣配置JavaMail一旦啓用了javaMail-1.5功能:

<mailSession mailSessionID="examplePop3MailSession" 
     jndiName="ExampleApp/POP3Servlet/exampleMailSession" 
     description="POP3 javax.mail.Session" 
     storeProtocol="pop3" 
     transportProtocol="smtp" 
     host="exampleserver.com" 
     user="[email protected]" 
     password="example" 
     from="[email protected]"> 
    <property name="mail.pop3.host" value="pop3.example.com" /> 
    <property name="mail.pop3.port" value="3110" /> 
</mailSession> 

See official documentation from IBM on configuring Java Mail 1.5

+0

謝謝你這麼多aguibert ...我可以問...也在同一行的質疑......是否自由具有等同於的配置,因爲我有這樣的我當前的glassfish服務器中的配置,需要將它們轉換爲WAS Liberty環境?謝謝你 – Sergio

+1

''是一個由Java EE規範定義的配置元素,所以Liberty支持這一點。對於'',你可以使用'server.env'文件來設置它們(詳情請參閱https://www-01.ibm.com/support/knowledgecenter/was_beta_liberty/com.ibm.websphere.wlp .nd.multiplatform.doc/AE/twlp_admin_customvars.html)。 –

+0

我還沒有完全得到這個工作,但一旦我做了,我會更新一定。 – Sergio

相關問題