The information provided in this post is tested under the following environment.
Documentum :6.5 SP2
Database :Oracle 11g
Operating System :SUSE Linux Enterprise Server 10
This post is about the default email notifications from a Documentum System.
I would classify these notifications broadly into three categories.
- Workflow Notifications: The email notification received when a WorkItem is assigned in the user’s documentum inbox
- Document Notification: A Read/Write notification for a document for which user has registered
- Jobs Alerts: This includes
- Job/Agent Exec failure alerts
- Alerts regarding Environment’s health from default jobs
The important point to note is that I am not claiming that these are the only email notifications send by Documentum. Further the categories of email notifications are not the actual scope of this post.
So moving ahead; if we wish to take benefit of these email notifications the most important thing is that our documentum environment should be capable of sending email notifications. This is achieved through a SMTP server. So, the first thing one would like to check is whether a SMTP IP address is defined in the Server Config Object.
SELECT object_name, smtp_server FROM dm_server_config;
If one is lucky enough to have a SMTP Server configured, the next interesting thing would be to verify whether the configured SMTP server is capable of doing what it is supposed to do. In addition it should also be reachable from the Content Server Host.
The following instructions can be used to test it. The text in blue is the user input.
Use Putty to connect to the Content Server Host and login using the Installation Owner’s account. Connect to the SMTP Server using Telnet.
mypc:~> telnet <smtp ip> 25
Trying <smtp ip>
...
Connected to <smtp ip>
.
Escape character is '^]'.
220 <smtp host> ESMTP Thu, 7 Jul 2011 11:53:25 -0400
HELO Me
250 <smtp host>
Hello [<content server host ip>], pleased to meet you
MAIL FROM: from@email.com
250 2.1.0 from@email.com... Sender ok
RCPT TO: my@email.com
250 2.1.5 my@email.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
This is a sample test email
.
250 2.0.0 p67FrP9G027974 Message accepted for delivery
You should feel quiet happy if you receive the intended email. Your SMTP server seems to be working just fine.
If the SMTP server is working absolutely fine then we may like to verify whether documentum is able to use the SMTP Server as per expectation. Documentum uses dm_mailwrapper.sh to call the mail program. dm_mailwrapper.sh resides in $DM_HOME/bin and by looking at it’s content it can be figured out that it is called in the following way.
mypc:~>/documentum/product/6.5/bin> ./dm_mailwrapper.sh "This is the Subject" "my@email.com" testcontent
testcontent is a text file which contains the content of the email message.
dm_mailwrapper.sh uses the mail program to send the emails. mail program can be tested using the syntax given in dm_mailwrapper.sh.
mypc:~>/documentum/product/6.5/bin> /bin/mail -s "This is the Subject" "my@email.com" < testcontent
By default all the Documentum email notification are in plain text. Documentum uses dm_event_sender method (dm_method) which by default uses dm_event_sender.ebs to generate the email content. The Verb of dm_event_sender method can be modified to use dm_html_sender.ebs and it starts generating the email content in HTML. But generating HTML content is not enough. sendmail program can be used in order to make sure that the email is rendered as HTML. dm_mailwrapper.sh can be updated as follows.
#/bin/mail -s "$subject" "$address" < $content_file
/usr/lib/sendmail -io "Dummy Subject" "$address" < $content_file
Before updating the dm_mailwrapper.sh do make sure that the sendmail program is sending emails. The content of testcontent can also be updated as HTML while doing so.
With the above two changes in place we should start getting the email notifications in HTML format. No, there is no need to restart anything. I indeed got few issues with the content of Workflow and the Jobs notification. Those issues were fixed by commenting few lines in the dm_html_sender.ebs. The content of the email notification can be customized by customizing dm_event_sender.ebs for plain text notifications and dm_html_sender.ebs for HTML notifications.