title: Closing Transmission Error. Timeout waiting for the data from client
body: <p>I am using local host to send bulk mails through SES. This question is answered by many but none of the solutions is helping me. The problem is I could send 100/ 150 mails at a time after that the above error is showing up. I tried to dispose of the client as suggested by some, but not working. I am using C# code to do this. Any answers/ suggestions is much appreciated. The below is the code I am using to send bulk mail using for loop. You might be thinking it might be a throttling issue, it is not because we have 70 emails/second and 500000 emails per day.</p>
  
  <pre><code>Parallel.For(0, mail.Count, i =&gt;
  {
      // Replace with your "From" address. This address must be verified.
      String TO = mail; // Replace with a "To" address. If your account is still in the
      // sandbox, this address must be verified.
  
      // Create an SMTP client with the specified host name and port.
      using (System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(HOST, PORT))
      {
          // Create a network credential with your SMTP user name and password.
          client.Credentials = new System.Net.NetworkCredential(SMTP_USERNAME, SMTP_PASSWORD);
  
          //Use SSL when accessing Amazon SES. The SMTP session will begin on an unencrypted connection, and then 
          //the client will issue a STARTTLS command to upgrade to an encrypted connection using SSL.
          client.EnableSsl = true;
          System.Net.Mail.MailMessage message1 = new System.Net.Mail.MailMessage(FROM, TO, SUBJECT, BODY);
  
          message1.IsBodyHtml = true;
          client.Send(message1);
          client.Dispose();
      }
  });
  </code></pre>