Group by and send email

As an example we can create a lookup dictionary where email is the key and value is a list of arrays

Assign Activity
dictLK | Dictionary(Of String, List(Of String) =

(From d in YourDataTableVar.AsEnumerable
Group d by k=d(“email add”).toString.Trim into grp=Group
Let il = grp.Select(Function (x) x(“id”).toString.Trim).toList
Select t = Tuple.Create(k,il).ToDictionary(Function (t)t.Item1, Function (t.Item2)

So you can iterate over the dictionary and can send the aggregated ids in each loop to the sender