Page History
Introduction
- The MailFragment element is used to specify the content, format and recipients of e-mail notifications.
- In addition mail server connection settings are used from JS7 - Job Resources
MailFragment
Attributes
The MailFragment
element supports the following attributes:
Attribute | Usage | Description |
---|---|---|
name | Required | Unique name of the fragment. |
job_resources | Required | A list of JS7 - Job Resources that specify mail server connection settings. |
content_type | Optional | Content type of the e-mail. Possible values:
Default: |
charset | Optional | Charset of the e-mail. Default: |
encoding | Optional | Encoding of the e-mail. Possible values:
Default: |
priority | Optional | Priority of the e-mail. Possible values:
Default: |
Attributes from Job Resources
The following attributes are required to be provided by one of the Job Resources that are assigned a MailFragment:
Attribute | Usage | Description |
---|---|---|
mail.smtp.host | Required | Host name or IP address of the mail server. |
mail.smtp.port | Required | The port number for SMTP access to the mail server. |
Optional attributes include - but are not limited to - settings specific for your mail server, e.g. for authentication:
Attribute | Usage | Description |
---|---|---|
mail.smtp.timeout | Optional | Socket read timeout for mail server connection. |
mail.smtp.connectiontimeout | Optional | Socket connection timeout for mail server. |
mail.smtp.user | Optional | User name for the account that sends e-mail. |
mail.smtp.password | Optional | Password for the account that sends e-mail. |
mail.smtp.ssl.protocols | Optional | Specifies the TLS protocol version, e.g. TLSv1, TLSv1.1, TLSv1.2, should an SSL connection be used |
Basically any settings with the prefix mail.smtp.
can be assigned a Job Resource that is used with the MailFragment. JS7 makes use of JavaMail, therefore find a list of available setting e.g. from https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html.
Elements
The following elements are nested inside the MailFragment element:
Element | Element description | Description |
---|---|---|
MessageRef | Required, only once inside of the MailFragment element | Body of an e-mail notification that is provided by the referenced Message element. |
Subject | Required, only once inside of the MailFragment element | Subject of an e-mail notification. |
From | Optional or only once inside of the MailFragment element | E-mail address of the account that sends e-mail. |
To | Optional or only once inside of the MailFragment element | E-mail address of the recipient(s) of a notification e-mail. |
CC | Optional or only once inside of the MailFragment element | E-mail address of the recipient(s) of a carbon copy notification e-mail. |
BCC | Optional or only once inside of the MailFragment element | E-mail address of recipient(s) of a blind carbon copy notification e-mail. |
Subject
Subject of an e-mail notification.
The Subject
can contain Monitor Variables.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<Subject><![CDATA[JS7 JobScheduler Notification: ${TYPE} - Order ID: ${MON_O_ORDER_ID} - Workflow: ${MON_O_WORKFLOW_PATH}]]></Subject>
|
MessageRef
The Message element referenced specifies the body of an e-mail notification.
The Body
can contain the Monitor Variables.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<body>
<style type="text/css">.tg {border-collapse:collapse;border-spacing:0;border-color:#aaa;}.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#333;background-color:#fff;}.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#aaa;color:#fff;background-color:#f38630;}</style>
<table class="tg">
<tr>
<th colspan="4">Error/Warning</th>
</tr>
<tr>
<td>Return Code:</td>
<td>${MON_OS_RETURN_CODE}</td>
<td>Message:</td>
<td>${MON_OS_ERROR_TEXT}</td>
</tr>
<tr>
<td>Error Code:</td>
<td>${MON_OS_ERROR_CODE}</td>
<td>Warning:</td>
<td>${MON_OS_WARN_TEXT}</td>
</tr>
<tr>
<th colspan="4">Controller</th>
</tr>
<tr>
<td>Controller ID:</td>
<td>${MON_O_CONTROLLER_ID}</td>
<td>Agent URI:</td>
<td>${MON_OS_AGENT_URI}</td>
</tr>
<tr>
<th colspan="4">Order</th>
</tr>
<tr>
<td>Order ID:</td>
<td>
<a href="${JOC_HREF_ORDER}">${MON_O_ORDER_ID}</a>
</td>
<td>Order Title:</td>
<td>${MON_O_TITLE}</td>
</tr>
<tr>
<td>Order Log:</td>
<td colspan="3">
<a href="${JOC_HREF_ORDER_LOG}">${JOC_HREF_ORDER_LOG}</a>
</td>
</tr>
<tr>
<td>Workflow Path:</td>
<td>
<a href="${JOC_HREF_WORKFLOW}">${MON_O_WORKFLOW_PATH}</a>
</td>
<td>Workflow Title:</td>
<td>${MON_O_WORKFLOW_TITLE}</td>
</tr>
<tr>
<td>Job Name:</td>
<td>
<a href="${JOC_HREF_JOB}">${MON_OS_JOB_NAME}</a>
</td>
<td>Job Title:</td>
<td>${MON_OS_JOB_TITLE}</td>
</tr>
<tr>
<td>Job Label:</td>
<td>${MON_OS_JOB_LABEL}</td>
<td>Job Criticality:</td>
<td>${MON_OS_JOB_CRITICALITY}</td>
</tr>
<tr>
<td>Job Log:</td>
<td colspan="3">
<a href="${JOC_HREF_JOB_LOG}">${JOC_HREF_JOB_LOG}</a>
</td>
</tr>
<tr>
<th colspan="4">Order History</th>
</tr>
<tr>
<td>Status:</td>
<td>${MON_O_SEVERITY}</td>
<td>Time elapsed:</td>
<td>${MON_O_TIME_ELAPSED}</td>
</tr>
<tr>
<td>Start Time UTC:</td>
<td>${MON_O_START_TIME}</td>
<td>End Time UTC:</td>
<td>${MON_O_END_TIME}</td>
</tr>
<tr>
<th colspan="4">Order Step History</th>
</tr>
<tr>
<td>Status:</td>
<td>${MON_OS_SEVERITY}</td>
<td>Time elapsed:</td>
<td>${MON_OS_TIME_ELAPSED}</td>
</tr>
<tr>
<td>Start Time UTC:</td>
<td>${MON_OS_START_TIME}</td>
<td>End Time UTC:</td>
<td>${MON_OS_END_TIME}</td>
</tr>
</table>
</body>
|