title: SmtpClient: A connection attempt failed because the connected party did not properly respond after a period of time
body: <p>While working with Email sending in C#.NET in visual studio 2008 i got the below error</p>
  
  <blockquote>
    <p>A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.53.108:25</p>
  </blockquote>
  
  <p>But the same code was working fine in some other PC but when i am testing today it gives me error in <code>Send()</code> method... Also my network connection is good where i am testing the email code..</p>
  
  <p>Below is my email code </p>
  
  <pre><code>MailMessage mail = new MailMessage();
  mail.To.Add(to);
  mail.From = new MailAddress(from);
  mail.Subject = subject;
  mail.Body = body;
  mail.IsBodyHtml = true;
  SmtpClient smtp = new SmtpClient();
  smtp.Host = "smtp.gmail.com";
  smtp.Credentials = new System.Net.NetworkCredential("MyUserName@gmail.com",
                                                              "MyPassword");
  smtp.EnableSsl = true;
  smtp.Send(mail);
  </code></pre>
  
  <p>What could be the reasons for such error..???</p>