protected void btnSubmit_Click(object sender, EventArgs e) { try { string Myemailid = "*****@*****.**";// if (Myemailid != null) { MailMessage mail = new MailMessage(); mail.From = new MailAddress("*****@*****.**", "A Query For Palshoes"); mail.To.Add(Myemailid); mail.IsBodyHtml = true; mail.Subject = "Query.. " + txtname.Value; mail.Body = "Name :" + " " + txtname.Value + " <br />" + "Contact Number :" + " " + txtcontact.Value + " <br />" + "Email ID :" + " " + txtemailid.Value + " <br /><br />" + "Query :" + " " + txtmessages.Value + " "; SmtpClient smtp = new SmtpClient("Palshoes.com", 25); smtp.Credentials = new System.Net.NetworkCredential("*****@*****.**", "Tsc7o36&"); smtp.EnableSsl = false; smtp.Send(mail); local_product.AddContactSendMail(txtname.Value, txtcontact.Value, txtemailid.Value, txtmessages.Value); mpe.Show(); lblpopup.Text = "Your Query Send Successfully!"; //ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('Your Query Send Successfully')", true); txtname.Value = ""; txtcontact.Value = ""; txtemailid.Value = ""; txtmessages.Value = ""; } } catch { } }