Customize email digests
You can customize the email message that is sent to users as part of the daily and weekly email digests.
About this task
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. You 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. You 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 that is related to email digest recipient. It is an instance of the class IEmailDigestStoriesContainer. For more information about the IEmailDigestStoriesContainer class, refer to the following web page: IBM_Connections_3.0.1_Email_Digest
![]()
Note: The steps below must be performed on the dmgr profile.
Procedure
- Customize the content of the email message used for the daily and weekly email digests by doing one of the following.
- 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\<dm_profile_root>\config\cells\<cell-name>\LotusConnections-config\news\email
where <app_server_root> is the WAS installation directory and <dm_profile_root> is the dmgr profile directory, typically dmgr01.
- Make your 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.html
![]()
Note: The Freemarker version currently used is 2.3.15.
- Save your changes and then close the files.
- Synchronize all the nodes using the Integrated Solutions Console.
- Stop and restart the News application.
- To use your 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.html
![]()
Note: The Freemarker version currently used is 2.3.15.
- Save the templates in the following directory:
app_server_root>\profiles\<dm_profile_root>\config/cells\<cell-name>\LotusConnections-config\news\email
- Register the custom templates in the notification-config.xml file.
- From the dmgr host, go to...:
app_server_root>\profiles\<dm_profile_root>\bin
where <app_server_root> is the WAS installation directory and <dm_profile_root> is the dmgr profile directory, typically dmgr01. For example, on Windows:
C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01\binAttention: You must run the following command to start the wsadmin client from this specific directory because the Jython files for the product are stored here. If you try to start the client from a different directory, then the execfile() command that you subsequently call to initialize the administration environment for an IBM Connections component 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>
Microsoft 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 WAS.
- <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. If you are using the default port value, you do not need to specify this parameter. If you are not using the default and you do not know the port number, you can look up its value in the WAS Integrated Solution Console. To look up the SOAP port number, perform the following steps:
- Open the WAS Integrated Solution Console for the deployment manager, and then select System Administration -> dmgr.
- In the Additional properties section expand Ports, and then look for the SOAP_CONNECTOR_ADDRESS port entry to find the port number.
For example:
- AIX or Linux:
./wsadmin.sh -lang jython -username primaryAdmin -password p@assword -port 8879
- Microsoft Windows:
wsadmin -lang jython -username primaryAdmin -password p@assword -port 8879
Access the IBM Connections configuration files:
execfile("connectionsConfig.py")Check out the notification-config.xml file using the following command:
LCConfigService.checkOutNotificationConfig("<temp_dir>","<cell_name>")
where:
- <temp_dir> is the temporary directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories in the file path, even if you are using the Microsoft Windows operating system.
Note: 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 you are enabling mail. This argument is case-sensitive, so type it with care.
Use a text editor, open the notification-config.xml file from the temporary directory to which you checked it 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 your new templates:
<type name="dailyDigest" notificationType="FOLLOW"> <channel name="email" enabled="true"> <property name="sender">news_admin@emea.relay.example.com</property> <property name="ftl">{notification.source.url}/news/email/dailyDigest.ftl</property> <property name="bundlePath">{notification.source.url}/news/email/</property> <property name="bundleName">notification</property> </channel> </type> <type name="weeklyDigest" notificationType="FOLLOW"> <channel enabled="true" name="email"> <property name="sender">news-admin@emea.relay.example.com</property> <property name="ftl">{notification.source.url}/news/email/weeklyDigest.ftl</property> <property name="bundlePath">{notification.source.url}/news/email/</property> <property name="bundleName">notification</property> </channel> </type>
Save your changes and close the notification-config.xml file. Check the configuration files back in using the following command:
LCConfigService.checkInNotificationConfig("<temp_dir>","<cell-name>")To exit the wsadmin client, type exit at the prompt. Synchronize all the nodes using the Integrated Solutions Console. Stop and restart all the IBM Connections application servers.
To edit the text strings used in the email digest:
- Use a text editor, open the notification_<language_code>.properties files in the following directory and make your changes:
app_server_root>\profiles\<dm_profile_root>\config\cells\<cell-name>\LotusConnections-config\news\email
Where <language_code> is the locale of the language. For example, notification_fr.properties.
Tip: To see where each string that you 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_<locale>.properties files.
- Save your changes and then close the files.
- Synchronize all the nodes using the Integrated Solutions Console.
- Stop and restart the News application.
To customize the images used in the email digest: Note: Email digests include an IBM Connections logo image and individual application icons.
- Locate the images in the following directory:
app_server_root>\profiles\<dm_profile_root>\config\cells\<cell-name>\LotusConnections-config\news\email\images
- Replace any image that you want to customize with your own version using the same file name.
The images are sent as MIME attachments to each email digest, so ensure that the image size is small.
- Synchronize all the nodes using the Integrated Solutions Console.
- Stop and restart the News application.
Parent topic
Customizing
Related tasks
Starting the wsadmin client
Configure notifications