title: Cannot connect to remote server while sending mail
body: <p>I'm using code below to send an email and it just doesn't work and gives an exception:</p>
  
  <pre><code>MailDefinition md = new MailDefinition();
  md.IsBodyHtml = true;
  md.From = EMAIL_FROM;
  md.Subject = "لینک تغییر رمز";
  MailMessage mm = md.CreateMailMessage(to, null, new System.Web.UI.Control());
  string body = link;
  mm.Body = body;
  SmtpClient smtp = new SmtpClient();
  smtp.UseDefaultCredentials = false;
  smtp.Host = EMAIL_SMTP;
  smtp.Port = EMAIL_PORT;
  smtp.Credentials = new System.Net.NetworkCredential(EMAIL_FROM, EMAIL_PASSWORD);
  smtp.Send(mm);
  </code></pre>
  
  <p>where sender username &amp; password are checked and correct, port is 25 and smtp is mail.kawp.co.ir, on send function it throws an exception with the below error message</p>
  
  <pre><code>{"Unable to connect to the remote server"}
  {"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 xx.xxx.xx.xx:25"}
  </code></pre>
  
  <p>I'm using the same method and function for my other domains which are hosted on the same server and they are working fine. What possibly could be causing the problem here?</p>
  
  <p><b>p.s</b>: I also can't handshake with the mail.kawp.co.ir 25 via telnet </p>
  
  <p>Thanks in advance</p>