emailid = table.Rows[0]["EmailId"].ToString(); MailMessage mail = new MailMessage(); mail.To.Add(emailid); mail.From = new MailAddress(txtemail.Text.ToString()); mail.Subject = "Registration"; string Body = "Please Approve my Registration"; mail.Body = Body; SmtpClient smtp = new SmtpClient("127.0.0.1"); smtp.Host = "smtp.gmail.com"; try { smtp.Send(mail); Response.Write("Mail sent successfully"); clearcontrol(); } catch (Exception ex) { Response.Write("Mail send failed"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)