Configuring e-mail notification : Customizing the e-mail message : Using the e-mail message template
 
Using the e-mail message template
The e-mail message template, acnotification.xml, is an XML file that uses UTF-8 encoding. iHub constructs the e-mail about job completion notices based on the template. To customize the e-mail that iHub sends, modify the following default template:
<?xml version="1.0" encoding="UTF-8"?>
<notificationTemplate version="1.0">
<successMessage>
<subject>Actuate iHub Notification</subject>
<body>
<
-- Body Text Begin -->
Actuate iHub - Report <insert variable="jobType"/>
complete
For Information Console:
Report: <insert variable="reportLink"/>
If the URL above does not work, copy the entire link and paste it into the address bar of your web browser, then press Enter or Return.
Completed at: <insert variable="jobCompletion"></insert>
Note: If the job submitter requested that you receive the report as an attachment to this email, but the report is not attached, then you probably do not have the privileges required to view the entire report. Please contact your system administrator.
<
-- Body Text End -->
</body>
</successMessage>
<failureMessage>
<subject>Actuate iHub Notification</subject>
<body>
<
-- Body Text Begin -->
Actuate iHub - Report <insert
variable="jobType"/>
failed.
For Information Console:
Report: <insert variable="reportLink"/>
If the URL above does not work, copy the entire link and paste it into the address bar of your web browser, then press Enter or Return.
Completed at: <insert variable="jobCompletion"></insert>
Warning/Error:
<insert variable="jobDetailedStatus"/>
<
-- Body Text End -->
</body>
</failureMessage>
</notificationTemplate>
Working with e-mail template elements
The following list describes the e-mail template elements and text encoding information:
*body
Element that specifies the content of the e‑mail body. The format of the body of the e‑mail body can be in any format supported by the e-mail client. The body content can include insert elements.
Use CDATA sections to embed e-mail body content that is exempt from XML parsing rules. For example, if you specify the e-mail body content in HTML or any other markup language, the insert elements must be outside of CDATA sections.
*failureMessage
Parent element of the subject and body for an e-mail notice for a failed job.
*insert element
Optional element that inserts job and document information in subject and body message content. The value of the variable attribute specifies the information iHub inserts.
The element must appear outside any CDATA section used within the content of body or subject elements.
*notificationTemplate
Required root element of the e-mail notification template.
*subject
Element that specifies the content of the subject line. The subject content is plain text. The tag value or content can include insert elements to display values related to the job or document.
Use CDATA sections to embed e-mail body content that is exempt from XML parsing rules. The insert elements must be outside of CDATA sections.
*successMessage
Parent element of the subject and body elements for an e-mail notice for a successful job.
The following list describes the e-mail template attributes:
*email-content-type
Optional body element attribute that specifies the content type of the body content.
Use this attribute when constructing the e-mail message, because the e-mail protocol requires that you specify the content type.
The value for this attribute is either text/plain and text/html.
*variable
Required insert element attribute. Specifies the information to insert in the e‑mail subject or body.
*version
Required notification template attribute. Specifies the version number of the notification template file.
Using variable attributes
Table 4‑2 describes the valid values of variables for insertion in e-mail notices.
Table 4‑2 Variable values for e‑mail notices 
Variable
Value
jobName
Job name.
jobSubmitter
Job submitter’s user name.
jobStatus
Status of job: Completed or Failed.
jobDetailedStatus
Detailed status of the job from the job status page.
jobType
Type of job: Execution or Printing.
jobHeadline
The job’s headline.
jobCompletion
Date and time of job completion.
reportDocumentName
Document name. Available for a successful job.
reportDocumentVersionName
Document version name. Available for a successful job.
reportDocumentVersionNumber
Document version number. Available for a successful job.
reportLink
Hyperlink to the document in the Encyclopedia volume for a successful job. For a failed job, the link accesses the job status page.
The following example uses the insert element’s reportLink variable to display the URL to the document in the e-mail notice that iHub sends:
Report: <insert variable="reportLink" />
Using HTML in the e-mail template
To use HTML in the successMessage or failureMessage elements, set the message’s body email-content-type attribute to text/html.
<body email-content-type=”text/html”>
Enclose the HTML in CDATA sections to exclude the HTML from XML parsing rules. The insert elements must be outside CDATA sections. The following example shows a successMessage element with HTML formatting:
<?xml version="1.0" encoding="UTF-8" ?>
<notificationTemplate version="1.0">
<successMessage>
<subject>
Report Delivery Notification:
<insert variable="jobHeadline"/>
</subject>
<body email-content-type="text/html">
<[!CDATA[
<html>
<body>
<h2>
]]>
<insert variable="jobHeadline"/>
<[!CDATA[
</h2>
]]>
Version <insert variable=
"reportDocumentVersionNumber"/>
of report <insert variable="reportDocumentName"/>
is now available online.
<[!CDATA[
<a href="
]]>
<insert variable="reportLink"/>
<[!CDATA[
">Go to Report</a>
<p>
<table border="2pt;">
<tr><td>Report Submitter: </td><td>
]]>
<insert variable="jobSubmitter"/>
<[!CDATA[
</td></tr>
<tr><td>Report Generation Date: </td>
<td>
]]>
<insert variable="jobCompletion"/>
<[!CDATA[
</td>
</tr>
</table>
<br><br>
</body>
</html>
]]>
</body>
</successMessage>