How To
Summary
You set up a mail server in Liberty to enable Send Mail for your container environment users.
Objective
Before you can use this function, you must configure a mail session in your application server. In a container environment, you set up this configuration for Liberty by adding an XML file with the settings for your environment to the configDropins/overrides directory.
Procedure
To set up a mail session for your Liberty application server:
- Create a file called icn_mail.xml with the following contents:
<server> <mailSession mailSessionID="CNMailSession" jndiName="mail/CNMailSession" description="ICN Mail Session" storeProtocol="imap" transportProtocol="smtp" host="server.domain.com" user="MailAdmin@domain.com" password="password" from="MailAdmin@domain.com"> </mailSession> </server>
You can find a sample of this file in the following location: https://github.com/ibm-ecm/container-samples/blob/5.5.4/ICN/configDropins/overrides/icn_mail.xmlDifferent environments might require additional parameters. For example, the following icn_mail.xml file might be appropriate for environments that use SSL:<server> <mailSession mailSessionID="CNMailSession" jndiName="mail/CNMailSession" description="ICN Mail Session" storeProtocol="imap" transportProtocol="smtp" host="smtp.sendgrid.net" user="mailadmin" password="password" from="MailAdmin@domain.com"> <property name="mail.smtp.host" value="smtp.sendgrid.net" /> <property name="mail.smtp.port" value="465" /> <property name="mail.smtp.auth" value="true" /> <property name="mail.smtp.ssl.enable" value="true" /> </mailSession> </server>
- Update the values in your icn_mail.xml file to reflect your environment:
- For the
user
, enter a user that has access to the email server to log on. - For the
password
parameter, use 64 bit encoding for your value. - For
storeProtocol
, specify the Store Protocol used by the Mail Session instance. The default Store Protocol is imap. - For
transportProtocol
, specify the Transport Protocol used by the Mail Session instance. The default transport protocol is smtp. - For
host
, specify the host of the mail session.
- For the
- Save your edited icn_mail.xml file to the configDropins/overrides directory for your Navigator deployment.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
14 October 2020
UID
ibm16118270