2022.1

Table Of Contents
Preview mode.
The To address must always be variable. This field is not used when you send a test email
(see "Generating Email output" on page1560).
Note
Using a variable email address requires you to load dataor a data mapping configuration
first; see "Loading data" on page833.
The Email Script Wizard
In addition to the drag and drop method, you can use the Email Script Wizard to add data to an
email header field. It lets you choose one or more data fields and enter a prefix and/or suffix
(per data field).
There are two ways to open the Email Script Wizard:
l Via the Email Fields. Open the email section and expand the Email Fields at the top by
clicking Email Fields. Click the word before the email field that you want to set. If there
already is a script for that field, that script will be opened. Otherwise, a new script will be
created and opened.
l
Via the Scripts pane. Click the black triangle on the New button and select the
respective email script. A new script will be added to the Scripts pane. Double-click the
new script to open it. See "Script wizards" on page1069 for an explanation of the options
in the script wizard.
The default script adds the content of the selected data field to the header field.
If you want to write a more complex script, click the Expand button. The result of the script
should be a valid, fully-formed email address.
The language in which the script has to be written is JavaScript. For more information on
writing scripts, see "Writing your own scripts" on page918.
Other header fields
At some point you may need to define a header field that isn't available in the Preferences or in
the Email Fields. This can be done in a Control Script. For a few examples of such scripts, see
"Adding custom ESP handling instructions" on page1566. To get started with Control Scripts,
refer to "Control Scripts" on page954.
Page 563