title: SmtpClient is not working with values given in constructor
body: <p>I found this weird problem with SmtpClient class. I am not sure is this the correct behavior  or not. So the problem is when I give my host name and port into constructor of "SmtpClient" class. it does not work. it gives me this error.
  "The server committed a protocol violation. The server response was: UGFzc3dvcmQ6".</p>
  
  <p>I tried to find this error on google as well, but nothing worked for me.
  code for this is below:</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>SmtpClient client = new SmtpClient("&lt;Host name&gt;","port number");
  client.EnableSsl = true;
  client.DeliveryMethod = SmtpDeliveryMethod.Network;
  client.Credentials = new NetworkCredential("&lt;User name&gt;", "password");
  MailMessage mailMessage = new MailMessage();
  mailMessage.From = new MailAddress("&lt;From Email&gt;");
  mailMessage.To.Add("&lt;To Email");
  mailMessage.Body = "test";
  mailMessage.Subject = "test";
  client.Send(mailMessage);
  </code></pre>
  
  <p>But If I give "host" and "port" in property then it works fine. code for this is here</p>
  
  <p>></p>
  
  <pre><code>SmtpClient client = new SmtpClient();//_settings.EmailSetting.Host);
   client.Host = "&lt;hostName&gt;";
   client.Port=&lt;Port Number&gt;;
   client.EnableSsl = true;
   client.DeliveryMethod = SmtpDeliveryMethod.Network;
   client.Credentials = new NetworkCredential("&lt;User name&gt;", "password");
   MailMessage mailMessage = new MailMessage();
   mailMessage.From = new MailAddress("&lt;From Email&gt;");
   mailMessage.To.Add("&lt;To Email");
   mailMessage.Body = "test";
   mailMessage.Subject = "test";
   client.Send(mailMessage);
  </code></pre>
  
  <p>is there anybody else who faced the same issue. :)</p>