How to add a GMail filter for multiple accounts

Let’s say you want to filter messages sent to [email protected] and [email protected] and apply the ‘MyCompany’ label to those messages. You may think that typing the following in the ‘To’ field of the filter will work:

[codesyntax lang=”text”]

[/codesyntax]

but it doesn’t. It doesn’t work with ; either.

In order to add multiple addresses to the filter you have to separate them with a | or wrap them in parentheses and use OR as the separator. The following are working examples:

[codesyntax lang=”text”]

[/codesyntax]

[codesyntax lang=”text”]

[/codesyntax]

The same can be applied when searching email.