How to check if an emaildomain exists in a List

I have a robot how is receiving emails.
No I have the following problem.
For each company of which we receive an email I need to use a different template for extracting info from the attachment: pdf. (this template name is mentioned in the third column of the config file)
All the companies are stored in de config file and thus available in the dictionary
For iterating trough the email I use a For Each activity.

How do I check if the Email Domain of the received Email email exists in the config file and how do I retrieve the template name?

Thanks in advance
Marcel