Sending mail Using C# asp.net
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/11704042/send-email-asp-net-c-sharp">send email asp.net c#</a>  </p>
</blockquote>



<p>I have sent mail several times using the technique several times before but somehow it doesnt work i am providing the code in the following:</p>

<pre><code>MailMessage myMailMessage = new MailMessage();
            myMailMessage.Subject = "Response From Client";
            myMailMessage.Body = "hello word";
            myMailMessage.From = new MailAddress("mymail@gmail.com", "jub");
            myMailMessage.To.Add(new MailAddress("mymail@gmail.com", "Softden"));

            SmtpClient mySmtpClient = new SmtpClient();
            mySmtpClient.Send(myMailMessage);
</code></pre>

<p>and my web.config is:</p>

<pre><code>&lt;mailSettings&gt;
      &lt;smtp deliveryMethod = "Network" from="Jubair &amp;lt;mymail@gmail.com&amp;gt;"&gt;
        &lt;network defaultCredentials="false" enableSsl="true" userName="mymail@gmail.com" password="Mypassword" host="smtp.gmail.com" port="587"&gt;&lt;/network&gt;
      &lt;/smtp&gt;
    &lt;/mailSettings&gt;
</code></pre>

<p>it says the smtp server requires a secure connection or the client was not authenticated.. Please help</p>
