There is a large list of email addresses and there is a limitation of max 100 email addresses to process once. This is the code I have written.
//Create a list of email addresses to test
List<string> emails = new List<string>();
for (int i = 0; i < 10000; i++)
{
emails.Add(string.Format("email{0}@domain.com", i));
}
//buffered read
int remainingCount = emails.Count;
int maxToReadOnce = 100;
int startIndex = 0;
while(remainingCount > 0)
{
int countToRead = (remainingCount > maxToReadOnce) ? maxToReadOnce : remainingCount;
List<string> myemails = emails.GetRange(startIndex, countToRead);
startIndex = startIndex + countToRead;
remainingCount = remainingCount - countToRead;
Process(myemails); // Method that process the email addresses
}