Gmail Filter – Label Emails from Specific Addresses

gmailgmail-filtersgmail-labelsgoogle-contacts

I've a list of email addresses (let's give it a name Cool Email Addresses for understanding purpose)

Email A
Email B
Email C

The emails I've sent and received should be given a label Label XYZ if the email sent or received contains one or more than one email addresses from the list Cool Email Addresses.

How can I create a filter like this?

Best Answer

You can create a new filter in Gmail and put this query in the "Has the words" field:

(to:(emailA@example.com OR emailB@example.com OR emailC@example.com)) 
OR (from:(emailA@example.com OR emailB@example.com OR emailC@example.com))