Sending mail from a dedicated mail server
Configure IBM Connections notifications to be sent from a specific SMTP server that is managed by WebSphere Application Server. If the designated mail server is unavailable, then notification emails fail to be delivered.
Mail is configured as part of the installation process. Only perform this procedure if you did not enable mail during the installation or to change the mail configuration.
We can choose to configure notifications to be sent from a single SMTP or have IBM Connections perform a lookup of multiple SMTP server to find one available to send the message. If we are interested in the latter configuration, see Sending mail from any available mail server.
- Log into the IBM WAS console.
- Expand Resources and select Mail > Mail sessions.
- Select Cell scope, and then create a new session.
- Specify values for the following fields:
- Name
- Specify IBM Connections Notification or another descriptive string.
- JNDI name
- Specify mail/notification as the value of the JNDI name.
- Specify the following custom properties to define time outs that will prevent resources from being consumed in the event the SMTP server is unavailable:
mail.smtp.timeout=120000 mail.smtp.connectiontimeout=120000 mail.smtp.sendpartial=trueThe time interval is specified in milliseconds. A value of 120,000 is two minutes.Set the property mail.smtp.sendpartial=true ensures that a message with some valid and some invalid email addresses will be sent, so the valid email addresses will still receive the message. If set to false or not defined, an invalid email address will cause the message to not be sent to any email addresses.
- In the Outgoing Mail Properties section, specify the fully qualified host name or IP address of the SMTP server to use in the Server field.
- If the SMTP server requires authentication, then set:
- User
- User ID used to connect to the SMTP server.
- Password
- Password associated with the user ID used to connect to the SMTP server.
- Verify Password
- Repeat the password specified in the previous field.
- If the SMTP server requires traffic to be sent over SSL, then add the following customer properties, and then specify values for them by clicking the Custom properties link, and then clicking New:
- mail.smtp.port
- Specifies the SMTP port number, which is often 465.
- mail.smtp.socketfactory.port
- Specifies the SMTP port number, which is often 465.
- mail.smtp.socketfactory.class
- Specifies the SSL socket factory class.
- mail.smtp.socketFactory.fallback
- Whether an unsecure connection can be made if SSL is not available. This property accepts the following values: true or false.
For example:
mail.smtp.port=465 mail.smtp.socketfactory.port=465 mail.smtp.socketfactory.class=javax.net.ssl.SSLSocketFactory mail.smtp.socketFactory.fallback=false
- Click OK, and then save the changes.
- Update the notification configuration file to indicate to use a mail session managed by WebSphere Application Server.
cd app_server_root/profiles/Dmgr01/bin
./wsadmin.sh -lang jython
execfile("connectionsConfig.py")
- Check out notification-config.xml :
LCConfigService.checkOutNotificationConfig("temp_dir","cell_name")
where temp_dir is a temporary directory, and cell_name is the WAS cell to which you installed the application for which we are enabling mail. When we specify a path to the temporary directory on a system running Windows, use a forward slash for the directory. For example: "/tmp".
AIX , Linux, and IBM i only: The temporary directory must grant write permissions or the command will not run successfully.
- From the temporary directory to which you checked out notification-config.xml, open it in a text editor.
- Search for the <emailChannelConfig> element, and then uncomment the following line of XML markup if it is commented out:
<useJavaMailProvider>true</useJavaMailProvider>
- Comment out the <smtpJNDILookup> element if it is not already.
<!--smtpJNDILookup> ... </smtpJNDILookup-->
- Save and close notification-config.xml.
Check out and edit the same file in the procedure described in Enable email notifications. If we plan to complete that procedure next, keep notification-config.xml open and checked out.
- Check in the configuration files:
LCConfigService.checkInNotificationConfig("<temp_dir>","<cell-name>")
- Stop and restart IBM Connections.
What to do next
Complete the steps described in Enable email notifications before users can send and receive email notifications.
Parent topic:
Configure notifications
Related: