title: smtpclient " failure sending mail"
body: <p>here is my code</p>
  <pre><code>for(int i = 0; i &lt; 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);
      if (s != null)
      {
          s.Send(oMail);
      }
      oMail.Dispose();
      s = null;
  }
  </code></pre>
  <p>this loops sends over 60,000 email. but my problem i am getting &quot; failure sending  mail&quot; in some of the email some times 5000 and some time less then that rest of them gets delivered. and i have check all those error out email has valid email address. dont know what is the problem. i really need help in this.</p>
  <p><strong>Edit: This is my exception Trace</strong></p>
  <blockquote>
  <p>Error - Failure sending mail.; Inner
  Ex - System.IO.IOException: Unable to
  read data from the transport
  connection: net_io_connectionclosed.
  at
  System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[]
  buffer, Int32 offset, Int32 read,
  Boolean readLine) at
  System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader
  caller, Boolean oneLine) at
  System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader
  caller) at
  System.Net.Mail.CheckCommand.Send(SmtpConnection
  conn, String&amp; response) at
  System.Net.Mail.MailCommand.Send(SmtpConnection
  conn, Byte[] command, String from) at
  System.Net.Mail.SmtpTransport.SendMail(MailAddress
  sender, MailAddressCollection
  recipients, String deliveryNotify,
  SmtpFailedRecipientException&amp;
  exception)</p>
  </blockquote>