Specifying message text, subjects, and recipients in external files

A Role_Email collaboration object allows the contents of the Retail_Item attributes that specify email message text, subject text, and recipients to contain the names of files.

Description

These files contain the actual email message text, subject text, and addresses, and can be easily modified without modifying the using collaboration objects. This feature permits messages, subjects, and recipients to be shared among multiple collaboration objects. A solution's messages, subjects, and recipients can all be contained in one easily modifiable directory.
The Role_Email collaboration object uses the following configuration properties to identify the Retail_Item attributes containing the email message text, subject text, and recipients:
MSG_TEXT_ATTRIBUTE
Identifies the Retail_Item attribute containing the message text, by default, internals.message_text
MSG_SUBJECT_ATTRIBUTE
Identifies the Retail_Item attribute containing the subject text, by default, internals.message_subject
MSG_RECIPIENT_ATTRIBUTE
Identifies the Retail_Item attribute containing the recipient or list of recipients, by default, internals.message_recipient_role

The collaboration object distinguishes whether the content of the Retail_Item attributes are actual values or filenames through use of its configuration property FILE_NAME_PREFIX. If the value of the Retail_Item attribute specified in the MSG_TEXT_ATTRIBUTE, MSG_SUBJECT_ATTRIBUTE, or MSG_RECIPIENT_ATTRIBUTE property is prefixed with the String specified in FILE_NAME_PREFIX, the Role_Email collaboration object interprets the rest of the value as a filename. The collaboration object reads the value of the file into a String variable in preparation for further processing. Files must be identified by their fully qualified names.

For instance, if the filename containing the email recipient(s) is c:\Email_Files\CategoryManagerRole.txt and the value of FILE_NAME_PREFIX is @, set the value of the Retail_Item attribute identified by the MSG_RECIPIENT_ATTRIBUTE property, as follows:
@c:\Email_Files\CategoryManagerRole.txt

If the values of the Retail_Item attributes specified in the MSG_TEXT_ATTRIBUTE, MSG_SUBJECT_ATTRIBUTE, and MSG_RECIPIENT_ATTRIBUTE properties do not start with the String specified in FILE_NAME_PREFIX, the Role_Email collaboration object obtains the email values directly from the attributes. If the Retail_Item attributes for message text or subject text contain no values, the Role_Email collaboration object supplies default values for them.

Parent topic: Controlling e-mail