title: SMPT SSL exception origin
body: <p>I am sending mail using <strong>SMTP SSL</strong> in my <strong>c# code</strong>. While sending mail , iam getting the following exception-</p>
  
  <blockquote>
    <p>Server does not support secure connections.</p>
  </blockquote>
  
  <p>When does this error comes? Does this implies problem on <strong>sender's side</strong> or the <strong>receiver's side.</strong></p>
  
  <p>SMTP configuration</p>
  
  <pre><code>    &lt;add key="EmailUserName" value="mail@gmail.com" /&gt;
      &lt;add key="NameToDisplay" value="Admin" /&gt;
      &lt;!--Use proper password--&gt;
      &lt;add key="EmailPassword" value="password" /&gt;
      &lt;add key="SmtpHostUrl" value="smtp.gmail.com" /&gt;
      &lt;add key="SmtpPort" value="25" /&gt;
  </code></pre>
  
  <p>SendMail method</p>
  
  <pre><code>SmtpClient objSmtpClient = new SmtpClient();
                  objSmtpClient.Host = ConfigurationManager.AppSettings["SmtpHostUrl"];
                  objSmtpClient.Port = int.Parse(ConfigurationManager.AppSettings["SmtpPort"]);
                  objSmtpClient.UseDefaultCredentials = false;
                  objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
                  objSmtpClient.EnableSsl = true;
                  objSmtpClient.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["EmailUserName"],
                      ConfigurationManager.AppSettings["EmailPassword"]);
  
                  objSmtpClient.Send(objMailMessage);
  </code></pre>
  
  <p>Thanks </p>