Configuring the Design Center Project > Preparing document previews > Creating output connectors for test sending emails (optional) > Selecting output connector for test sending emails (optional)

Selecting output connector for test sending emails (optional)
If you want to test send emails from different accounts depending on a variable value, you must use a script to select the output connector to be used. In the script, you can also add a watermark image to emails that are test sent. The image format must be supported by the email clients.
Prerequisites
To select an output connector for test sending
To add a watermark to test emails
In the HTML unpaginated driver settings, you can configure variables for the appropriate ones of the properties below (by assigning a Variable in the Alias area for each property). In the script, you can assign values to the properties.
For detailed information about the properties and possible values, see HTML unpaginated driver in the StoryTeller documentation.
Example 4
A company wants to test send emails from two different email accounts, residing on different mail servers, to verify that the emails are correct for both accounts.
In the Design Center Message, a variable called $MailServer picks up a value from the input data.
The Platform includes the following output connectors:
EmailTest1 – For test sending emails from account number one. The connector is used if $MailServer=Server1.
EmailTest2 – For test sending emails from account number two. The connector is used if $MailServer=Server2.
EmailOUT – For the final delivery of emails.
In the Runtime Process Settings dialog box, the email capabilities are enabled and the Custom option is selected.
In the Runtime Connector Selection Method dialog box, a variable called $connector is used to select output connector.
For each output connector, a variable called $watermark is defined in the Alias area for the Body background image property in the HTML unpaginated driver settings. The watermark image (test.jpg) is included in the resource set.
The script below is run before the Process and selects the output connector to be used.
if (isTestOutput())
{
$ChannelType = GetRequestedTestOutputChannel();

if ($ChannelType == "2")
{
if ($MailServer == "Server1")
{
$connector = "EmailTest1";
$watermark = "..\data\images\test.jpg";
}
else if ($MailServer == "Server2")
{
$connector = "EmailTest2";
$watermark = "..\data\images\test.jpg";
}
}
}
else
{
$connector = "EmailOut";
$watermark = "";
}
preproclog(0, " *** OUTCONNECTOR : " + $connector);
 
Related topics
Test output functions in Scripting Reference Guide
OpenText StreamServe 5.6.2 Updated: 2018-01-26