You need to use Expression.And -or- Expression.Or.
For Expresion.And you can use following code:
List<string> addresses = new List<string> {
"one@example",
"other@example.com"
};
ICriterion expresion = Expression.And(
addresses.ConvertAll(Expression.From).ToArray());
For Expresion.Or you can use following code:
List<string> addresses = new List<string> {
"one@example",
"other@example.com",
"and.another@example.com"
};
ICriterion expresion = Expression.Or(
Expression.From(addresses[0]),
Expression.From(addresses[1]));
for (int i = 2; i < addresses.Count; i++)
{
expresion = Expression.Or(
expresion,
Expression.From(addresses[i]));
}
... and regular Imap.Search method:
List<long> uids = client.Search(expresion);