Search code examples
c#.netemailsmtpdelay

delay in receiving email sent from c#


here is my code

for(int i = 0; i < number ; i++)
{
  MailAddress to = new MailAddress(iMail.to);
  MailAddress from = new MailAddress(iMail.from, iMail.displayName);
  string body = iMail.body;
  string subject = iMail.sub;
  oMail = new MailMessage(from, to);
  oMail.Subject = subject;
  oMail.Body = body;
  oMail.IsBodyHtml = true;
  oMail.Priority = MailPriority.Normal;
  oMail.Sender = from;
  s = new SmtpClient(smtpServer);
  s.ServicePoint.ConnectionLeaseTimeout = 0;
  if (s != null)
  {
     s.Send(oMail);
  }
  oMail.Dispose();
  s = null;
}

i am sending over 60,000 email using this code,now my problem some recipient gets email right away but some of them gets after few minutes and some of them gets even after few hours and may be many of them gets lost before reaching to destination. and my This Issue is still unanswered. i really need help in this. i am stuck. thanks


Solution

  • Actually that makes sense. Don’t you think that by sending 60K emails in a very short timeframe your are likely to be considered as a spammer? Delaying the emails like StrongMail does is a good way to prevent you from being banned by the ISPs.