Try OpenEdge Now
skip to main content
Managed Adapters Guide
Email Managed Adapter : Sending messages to multiple recipients : Using a LIST dataslot in the Email Adapter
 

Using a LIST dataslot in the Email Adapter

The following use case example demonstrates how lists and scalars are treated in List mode; that is, when the "To:" field of an Email Adapter is mapped to a LIST dataslot.
In this example, the goal is to send notification messages to the winners of a lottery. Assume we have the data about the winners, the prizes, and the lottery phone number, in the following four dataslots:
Table 13. Dataslots used in the use case example
Name
Data type
Dataslot value
ADDRESSES
LIST of strings
[
"joe@company.com",
"albert@company.com",
"jeff@othercompany.com"
]
NAMES
LIST of strings
[
"Joe",
"Albert",
"Jeff"
]
PRIZES
LIST of lists
[
[ "36in TV", "satellite radio" ],
[ "binoculars", "handheld GPS" ],
[ "a penny", "a dime", "and a quarter!" ],
]
PHONE
CHARACTER
"(408) 555-1234"
* Configuring the Email Adapter in List mode
* Mapping the Email Adapter in List mode