Customize email digests
We can customize the email message that is sent to users as part of the daily and weekly email digests.
Important: Before making any customizations, first back up the original notifications folder. In addition, ensure that any customized files are backed up before performing a product upgrade or applying a cumulative refresh or fix pack, as we might need to merge the changes again manually after making updates.
The content of the daily and weekly email digests is defined in templates that are processed by the FreeMarker engine. These templates are used for each recipient of the daily or weekly email digest. We can customize the content of the email digests by modifying the existing template files or by replacing the files with custom templates that you create yourself. We can also modify the notification properties files to add custom strings to the email digests and modify the images used in email digests.
The property named emailDigestBean is passed to the daily and weekly email digest templates. This property stores information about the digest related to email digest recipient. It is an instance of the class IEmailDigestStoriesContainer. For more information about the IEmailDigestStoriesContainer class, see:
http://www-10.lotus.com/ldd/lcwiki.nsf/dx/IBM_Connections_3.0.1_Email_Digest
Customize the content of the email message used for the daily and weekly email digests by completing one or more of the following steps.
- To customize the existing template files:
- Use a text editor, open the dailyDigest.ftl and weeklyDigest.ftl template files from the following location:
app_server_root/profiles/Dmgr01/config/cells/cell_name/LotusConnections-config/notifications/news
- Make the customizations to the templates as needed. For information about editing the templates, refer to the FreeMarker documentation on the following web page:
http://freemarker.sourceforge.net/docs/index.htmlThe Freemarker version currently used is 2.3.15. The main templates used are dailyDigest.ftl and weeklyDigest.ftl. To change the styles and structure of both weekly and daily digests, make the customizations to the style.ftl file in the aggregated folder.
The aggregated folder is shared by the daily and weekly digest and is specific to them. The folder is located in notifications/news/aggregated.
- Save the changes and then close the files.
- Synchronize all the nodes using the IBM WAS console.
- Stop and restart the News application.
- To use our own custom templates instead of the default templates:
- Create the templates by following the instructions provided in the FreeMarker documentation on this web page:
http://freemarker.sourceforge.net/docs/index.htmlThe Freemarker version currently used is 2.3.15.
- Save the templates in...
app_server_root/profiles/Dmgr01/config/cells/cell_name/LotusConnections-config/notifications/news
- Register the custom templates in notification-config.xml.
- Open a command prompt, and then change to the following directory on the system on which you installed the dmgr:
app_server_root/profiles/Dmgr01/bin
For example, on Windows:
C:/IBM/WebSphere/AppServer/profiles/Dmgr01/bin
Attention: Run to start the wsadmin client from this specific directory because the Jython files for the product are stored here. If we try to start the client from a different directory, then the execfile() command that you subsequently call to initialize the administration environment for a Connections application does not work correctly.
- Enter the following command to start the wsadmin client:
- AIX or Linux:
./wsadmin.sh -lang jython -user admin_user_id -password admin_password -port SOAP_CONNECTOR_ADDRESS Port
- Windows:
wsadmin -lang jython -user admin_user_id -password admin_password -port SOAP_CONNECTOR_ADDRESS Port
where:
- admin_user_id is the user name of a person in the Administrator role on the IBM WebSphere Application Server.
- admin_password is the password of the WAS administrator.
- SOAP_CONNECTOR_ADDRESS Port is the SOAP port for the WAS. The default value of the SOAP port is 8879. For the default port value, you do not need to specify this parameter. If we are not using the default and you do not know the port number, we can look up its value in the WAS Integrated Solution Console. To look up the SOAP port number:
- Open the WAS Integrated Solution Console for the deployment manager, and then select...
System Administration | dmgr | Additional properties section | Ports | SOAP_CONNECTOR_ADDRESS
For example:
./wsadmin.sh -lang jython -username primaryAdmin -password p@assword -port 8879
- Access the Connections configuration files:
execfile("connectionsConfig.py")
- Check out notification-config.xml :
LCConfigService.checkOutNotificationConfig("temp_dir","cell_name")
where:
- temp_dir is the temporary directory to which configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories, even with Windows.
AIX and Linux, only: The temporary directory must grant write permissions or the command will not run successfully.
- cell_name is the WAS cell to which you installed the application for which we are enabling mail. This argument is case-sensitive, so type it with care.
- Use a text editor, open notification-config.xml from the temporary directory to which it was checked out.
- Look for the following section of code and replace the value of the ftl property for each digest type with the file name of the new templates:
<type name="dailyDigest" notificationType="FOLLOW"> <channel name="email" enabled="true"> <property name="sender">news_admin@emea.relay.myco.com</property> <property name="ftl">dailyDigest.ftl</property> </channel> </type> <type name="weeklyDigest" notificationType="FOLLOW"> <channel enabled="true" name="email"> <property name="sender">news-admin@emea.relay.myco.com</property> <property name="ftl">weeklyDigest.ftl</property> </channel> </type>
- Save the changes and close notification-config.xml.
- Check the configuration files back in :
LCConfigService.checkInNotificationConfig("temp_dir","cell_name")
- To exit the wsadmin client, type exit at the prompt.
- Synchronize all the nodes using the WAS console.
- Stop and restart all the Connections application servers.
- To edit the text strings used in the email digest:
- Use a text editor, open the notification_language_code.properties files from one of the following directories and make the changes:
- News strings:
app_server_root/profiles/Dmgr01/config/cells/cell_name/LotusConnections-config/notifications/news/resources/nls
- Shared strings:
app_server_root/profiles/Dmgr01/config/cells/cell_name/LotusConnections-config/notifications/resources/nls
Where language_code is the locale of the language. For example, notification_fr.properties.
To see where each string that we are editing is used, look at the .ftl template files in the same directory, and check the statements with the following format:
u.resource("key")
where key is the key of a translated string in the resource bundle notification_language_code.properties files. Note the notification framework will look in the application-specific resources folder before moving to the shared strings in the shared resources folder.
- Save the changes and then close the files.
- Synchronize all the nodes using the WAS console.
- Stop and restart the News application.
- To customize the images used in the email digest:
Email digests include an IBM Connections logo image and individual application icons.
- Locate the images in...
app_server_root/profiles/Dmgr01/config/cells/cell_name/LotusConnections-config/resources/images
- Replace any image to customize with our own version using the same file name. The images are sent as MIME attachments to each email digest, so ensure the image size is small.
- Synchronize all the nodes using the WAS console.
- Stop and restart the News application.
Parent topic:
Customize notifications
Related:
Customize standard notifications
Customize shared resources for notifications
Related reference: