smtpException was unhandled by user code
<p>here is the code.</p>

<pre><code>void sendMail()
{
    MailMessage mail = new MailMessage();

    mail.To.Add("abc@gmail.com");
    mail.From = new MailAddress("abc@gmail.com", txt_name.Text);
    mail.Subject = txt_subject.Text;
    mail.Body = txt_body.Text;

    SmtpClient smtp = new SmtpClient("smtp.gmail.com");
    smtp.EnableSsl = true;

    NetworkCredential yetki = new NetworkCredential("abc@gmail.com", "11111111");
    smtp.Credentials = yetki;

    smtp.Send(mail);

    Response.Write("mailiniz başarılı bir şekilde gönderilmiştir");
}

protected void btn_gonder_Click(object sender, EventArgs e)
{
    sendMail();
}
</code></pre>
