How can i send email from/to any emails addresses like yahoo gmail pop3?
<p>What i tried now is to send email to my own gmail account but what ever i tried so far i'm getting error when trying to send.</p>

<p>I didn't try to send yet to my pop3 email and not to yahoo or from my pop3 or from yahoo. For now i'm trying to send to my gmail.</p>

<p>In a button click event:</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
{
    sendit("myg@gmail.com");
}
</code></pre>

<p>Then in the method sendit</p>

<pre><code>public string sendit(string ReciverMail)
{
        MailMessage msg = new MailMessage();

        msg.From = new MailAddress("myg@gmail.com");
        msg.To.Add(ReciverMail);
        msg.Subject = "Hello world! " + DateTime.Now.ToString();
        msg.Body = "hi to you ... :)";
        SmtpClient client = new SmtpClient();
        client.UseDefaultCredentials = true;
        client.Host = "smtp.gmail.com";
        client.Port = 587;
        client.EnableSsl = true;
        client.DeliveryMethod = SmtpDeliveryMethod.Network;
        client.Credentials = new NetworkCredential("myg@gmail.com", "myp");
        client.EnableSsl = true;
        client.Timeout = 20000;
        try
        {
            client.Send(msg);
            return "Mail has been successfully sent!";
        }
        catch (Exception ex)
        {
            return "Fail Has error" + ex.Message;
        }
        finally
        {
            msg.Dispose();
        }
}
</code></pre>

<p>Using break point it's always getting to the catch part show the message:</p>

<blockquote>
  <p>"The SMTP server requires a secure connection or the client was not
  authenticated. The server response was: 5.5.1 Authentication Required.
  Learn more at"</p>
</blockquote>