I am using SmtpClient (.NET 3.5, VS 2008) for mass mailings. The code below starts with about 2 seconds per send and deteriorates to more than 20 seconds per send after the foreach loop has processed about 30 addresses and proceeds to deteriorate. Any ideas?
Jim
// Setup Client
SmtpClient client = new SmtpClient(smtpHost, 587);
client.Credentials = new NetworkCredential(smptLogin, smtpPassword);
// Send mail
foreach (string address in addresses)
{
MailMessage message = BuildMessage(body);
message.To.Clear();
message.To.Add(new MailAddress(address));
client.Send(message);
}