This article applies to the Premises (i.e., 5.1) version of xMatters only.
If you are using the generic scripts in the Integration Agent, you may encounter a 50-character limit on the length of the Subject field for email notifications. Any email subjects longer than 50 characters will be truncated.
You can increase this limit by editing the notification content scripts using the xMatters Developer IDE.
NOTE: According to rfc2822, email servers are not required to support subject lines longer than 78 characters. If you modify the scripts to allow subjects longer than 78 characters, your notifications may cause delivery issues with some email servers:
To enable longer subject lines for email notifications:
- Open the BUSINESS PROCESS > CONTENT script.
- Locate the following block of code:
# Specify subject line content. If the subject already exists in the notifcation object then use that, otherwise create a new subject. IF ( EXISTS( $notification.subject ) ) $subject = $notification.subject ELSE-IF ( EXISTS( $event.subject ) ) IF ($subscription) $subscriptionString = "Subscription" $shortSubscriptionString = "xM SUB: " ENDIF $subject = $event.subject ELSE $msg = $event.message $strLength = $msg::length() IF($strLength < 50) $summary = $msg ELSE $shortMsg = $msg::substring(0,49) $shortMsg = $shortMsg & "..." $summary = $shortMsg ENDIF IF ($subscription) $subscriptionString = "Subscription" $shortSubscriptionString = "xM SUB: " ENDIF $subject = $summary ENDIF RETURN
- Modify the IF($strLength < 50) and $shortMsg = $msg::substring(0,49) to the length you want.
- The IF statement must be one digit higher than the $shortMsg assignment.
xMatters internal reference: DTN-4767