Sir i created a feedback form in which i receives user feedback on my mail id once or twice the user is able to give feedback bt the error page pops up.Is the gmail that creating problem.
it shows custom error problem.But twice i was able to receive mail but after this i started getting this problem
or in web.config i have to add some security credentials
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
MailMessage mail = new MailMessage();
mail.To.Add(TextBox1.Text(user enters his mail address));
mail.CC.Add("myemail");
mail.From = new MailAddress("myemail");
mail.Subject = "Thanks For Registering";
string body =" ";
mail.Body = body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.EnableSsl = true;
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new System.Net.NetworkCredential("mymailaddress", "password");
smtp.Send(mail);
TextBox1.Text = "";
}