title: Server does not support secure connection
body: <p>Some days before this code perfectly works for me but now it shows exception</p>
  <pre><code> MailMessage mail = new MailMessage();
   mail.To.Add(&quot;pramuk97@gmail.com&quot;);
   mail.From = new MailAddress(&quot;pramuk97@gmail.com&quot;);
   mail.To.Add(&quot;pramuk97@hotmail.com&quot;);
   mail.Subject = &quot;from bhsbiet souvenir 2012&quot;;
   mail.Body = TextBox5.Text;
   mail.IsBodyHtml = true;
   SmtpClient smtp = new SmtpClient();
   smtp.Host = &quot;smtp.gmail.com&quot;;
   smtp.Credentials = new System.Net.NetworkCredential(&quot;pramuk97@gmail.com&quot;, &quot;pwd&quot;);
   smtp.EnableSsl = true;
   smtp.Send(mail);
  </code></pre>
  <p>And the exception is
  Server does not support secure connections.</p>
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
  <p>Exception Details: System.Net.Mail.SmtpException: Server does not support secure connections.</p>
  <p>Source Error:</p>
  <blockquote>
  <p>Line 78: smtp.Credentials = new System.Net.NetworkCredential(&quot;pramuk97@gmail.com&quot;, &quot;mukund1375&quot;);Line 79: smtp.EnableSsl = true;Line 80: smtp.Send(mail); Line 81: TextBox5.Text = &quot;message sent&quot;;Line 82: TextBox5.ReadOnly = true;</p>
  <p>Source File: E:\bhsbiet\bhsbiet\home.aspx.cs Line: 80</p>
  </blockquote>
  <p>Stack Trace:</p>
  <blockquote>
  <p>[SmtpException: Server does not support secure connections.] System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) +1223423 System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) +222 System.Net.Mail.SmtpClient.GetConnection() +50 System.Net.Mail.SmtpClient.Send(MailMessage message) +1772 bhsbiet.home.buttonx_click(Object sender, EventArgs e) in E:\bhsbiet\bhsbiet\home.aspx.cs:80 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563</p>
  </blockquote>