Hi Pat,
It might be hard to match the collection item considering an email object could also contain name and different cases.
Can't try it in my lab right now but thinking the easiest way to check it might be using
Contains(ToString(Email.Message.to), "email@adress.com", true) == true
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
------------------------------
Original Message:
Sent: 09-20-2024 18:16
From: Pat Johnson
Subject: Control flow based on "email.message.to".
This is not working for me what am I missing?
Trying this fails the switch statement.

------------------------------
Pat Johnson
Numerica Credit Union
------------------------------
Original Message:
Sent: 02-16-2024 11:24
From: Jan Heinonen
Subject: Control flow based on "email.message.to".
Hi Tom,
The Email.Message.to is a collection (or array) and can contain several addresses if entered in the To field of an e-mail.
Easiest to check if it contains something if used in a Switch is probably with
FindFirst(Email.Message.to, "emailaddress") >= 0
FindFirst returns the index (0 or greater) if found and -1 if not found.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB