title: System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: 4.4.2
body: <p>I get this error when I'm frequently sending some e-mail to a list of users. Say it sends 10 mails and 1 gives an error, then sends a couple more mails and gives the same error. </p>
  
  <p>The code looks like this:</p>
  
  <pre><code>public static bool SendEmail(string toMail, string fromname, string from, string subject, string body, string BCC)
      {
  
          MailMessage mailmessage = new MailMessage("frommail@mail.com", toMail, subject, body);
          mailmessage.IsBodyHtml = true;
          mailmessage.BodyEncoding = Encoding.GetEncoding(1254);
          mailmessage.SubjectEncoding = Encoding.GetEncoding(1254);
  
          SmtpClient objCompose = new SmtpClient("xxxx");
  
          try
          {
              objCompose.Send(mailmessage); 
  
              return true;
          }
          catch (Exception ex) { 
  
          }
  
          return false;
      }
  </code></pre>
  
  <p>And the error I get is this:</p>
  
  <blockquote>
    <p>System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: 4.4.2 mailer.mailer.com Error: timeout exceeded
      at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String 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)
      at System.Net.Mail.SmtpClient.Send(MailMessage message)</p>
  </blockquote>
  
  <p>can anyone please help, this bug is killing me. </p>
  
  <p>Thanks in advance. </p>