When running the EasyLink Email connector in Point To Point mode (Email Type >
Point To Point), StreamServer can send multiple point-to-point emails. To send for example an email to ten different recipients, StreamServer has to create ten output jobs (personalized to each recipient), and the EasyLink service has to deliver ten individual emails, just as received from StreamServer. In Point To Point mode there is also an option to use a comma separated recipient list, where the same email can be sent to multiple recipients, but no personalization of the email content is possible.
When running the EasyLink Email connector in Broadcast mode (Email Type >
Broadcast), StreamServer can broadcast the same email content to multiple recipients specified in a destinations table. The destinations table can contain personalized information, and this information can be included in the emails in order to do simple personalization of the email content (variable replacement) on the Easylink side. In Broadcast mode, only one email is sent to the EasyLink service, and this email is broadcast to all recipients specified in the destinations table.
The destinations table contains one row for each recipient, and each row contains a number of tab separated information items. The destinations table can be a fixed table resource that you reference as
Destinations value in the connector settings, and it can also be generated dynamically by scripts at runtime. When using a dynamic destinations table you must use a variable as
Destinations value in the runtime connector settings.
//!CodePage UTF8!
001 joeboe@example.com "Joe Boe" "Kingston" "Jamaica"
002 belair@abc.com "Bella Air" "Jokkmokk" "Sweden"
003 svravd@def.com "Svante Raavdalen" "Oslo" "Norway"
001 joeboe@example.com "Joe Boe" "Kingston" "Jamaica"
<Internet ref="001">
<InsertList>
<Insert number="1">Joe Boe</Insert>
<Insert number="2">Kingston</Insert>
<Insert number="3">Jamaica</Insert>
</InsertList>
<Email>joeboe@example.com</Email>
</Internet>
When you configure the Process that generates the email body you can add placeholders for the items in the insert list. A placeholder has the format
(In), where
n is the value of the
number attribute in the insert list. For example, use the placeholder
(I2) to reference the value of the element
<Insert number="2"> in the insert list.
In this example, the placeholder (I1) references the customer name in the insert list.
<p>Dear (I1), due to the recent severe weather and flooding...</p>
All elements to use as items in the destinations table should be extracted into variables. These variables and substitution table script functions are used in a Before Message script to create the destinations table dynamically. A variable that references the destinations table is then used as
Destinations value in the runtime connector settings to select the destinations table.
See the Scripting Reference for more information about substitution table script functions.
The input to StreamServer may contain thousands of messages, where each message is targeted for a specific recipient. The output to the EasyLink service is one single SOAP envelope containing destination and insert information for all recipients and one single email body (Process output).
In a standard processing chain in StreamServer, each triggered Event also invokes the Process. Since all Process calls will result in the same output (data including placeholders), it is only necessary to run the Process once in a job. You can therefore use the
skip() script function to skip all Processes but the last. See the
Scripting Reference for more information about
skip().