Using templates with outgoing email
Email templates can help you with outgoing mail from the Email Engine, for example, with email generated from notification actions or escalations. A mail template exported with BMC Remedy Developer Studio lists all the available field labels you could use, for example, in creating an outgoing email. Replies to incoming email are not discussed in this section. For information, see Sending-professional-looking-reply-emails.
You can use content templates with notifications or escalations to arrange the fields and values of the entry that triggered the notification. Content templates used with notifications or escalations can contain the following information:
- Plain text
- Variables
For example, the #$$AR Notification Text$$# variable is replaced by the text entered in the Text Field of Notification group in BMC Remedy Developer Studio. Core fields
For example, core fields are replaced with their actual values in the email that is sent out. You use the following syntax with core fields:
#$$<DatabaseNameOfField>$$#Form fields
You can use the fields on the form on which the notification action or escalation is based in content templates. You use the following syntax with form fields:
#$$<DatabaseNameOfField>$$#Content templates used with notifications or escalations cannot contain the following information:
- Keywords — Keyword substitution in content templates is not implemented in Email Engine 7.0.00 and later. As a result, $USER$ or $DATABASE$ in a content template will not be replaced with actual values.
Field IDs — Field IDs are not substituted with entry values. As a result, #$$536870925$$# is incorrect. Instead, you should use #$$Id_Integer$$# where Id_Integer is the database name of the field.
The following example illustrates a content template for outgoing notifications:#$$AR Notification Text$$#
CORE FIELDS:
-----------------
RequestId: #$$Request ID$$#
EmployeeName:#$$Name_Char$$#
Submitter:#$$Submitter$$#
ShortDescr:#$$Short Description$$#
LastModifiedBy:#$$Last Modified By$$#
Modified Date:#$$Modified Date$$#
Status:#$$Status$$#
StatHist-User:#$$Status History.New.USER$$#
StatHist-Time:#$$Status History.New.TIME$$#
StatHist-Time:#$$Status History.New.TIME$$#
Employee Info General Fields:
------------------------------
Employee Name : #$$Name_Char$$#
Employee Id: #$$Id_Integer$$#
Employee Salary in Decimal : #$$Salary_Decimal$$#
Employee Salary in Currency : #$$Salary_Currency$$#
Employee Gender : #$$Gender_Dropdown$$#
Employee Marital Status : #$$Marital Status_Radio$$#
Employee Interests: #$$Interests_Dairy$$#
Employee Skills : #$$Skills_CheckBox$$#
Employee Vacation Left : #$$Vacation_real$$#
PresentOrPermAddChoiceField : #$$PresentOrPermAddChoiceField$$#
PresentOrPermAddChoiceField : #$$PresentOrPermAddChoiceField$$#
Joining Details:
---------------
JoiningDate_Date : #$$JoiningDate_Date$$#
JoiningDateTime_DateTime : #$$JoiningDateTime_DateTime$$#
Joininig Date_Time : #$$Joininig Date_Time$$#
XML outgoing content templates
You can specify outgoing content templates in XML format, as shown in the following example:
<Root>
<NotificationText>#$$AR Notification Text$$#</NotificationText>
<RequestID>ReqId: #$$Request ID$$#</RequestID>
<Submitter>Sub: #$$Submitter$$#</Submitter>
<ShortDescr>SD: #$$Short Description$$#</ShortDescr>
<EmpName>Emp Name: #$$name_char$$#</EmpName>
</Root>
HTML outgoing content templates
You can specify outgoing content templates in HTML format. HTML outgoing content templates can contain graphic images. The following code is an example of HTML outgoing content template that contains a GIF image:
</Root>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Lighthouse</title>
</head>
<body>
<p><font face="Arial Black"> #$$AR Notification Text$$# </font></p>
<p><img border="0" src="./images/lighthouse.gif" width="174" height="188"></p>
<p><font face="Arial Black"><b>Lighthouse</b></font></p>
<p><font face="Arial Black"> RequestID: #$$Request ID$$# </font></p>
<p><font face="Arial Black"> EmployeeName:#$$Name_Char$$#</font></p>
</body>
</html>