I am trying to send 100 emails to myself asynchronously using the code below and I am receiving only few emails (5 emails) instead of 100 . Any help would be appreciated.
Thanks
using (var client = new SmtpClient())
{
int count = 100;
while (count > 0)
{
MailMessage msg = new MailMessage(email, email, "Test" + count, mailMessage.Body);
client.Host = smtpServer;
client.AuthenticationMethod = SmtpAuthentication.None;
client.BeginSendMessage(msg);
count--;
}
}