MailMessage loginInfo = new MailMessage(); loginInfo.To.Add(txt_email.Text.ToString()); loginInfo.From = new MailAddress("my email id"); loginInfo.Subject = "Contact Detail"; loginInfo.Body = "Message: " + txt_message.Text; loginInfo.IsBodyHtml = true; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.Port = 587; smtp.EnableSsl = true; smtp.Credentials = new System.Net.NetworkCredential("my user name", "My password"); smtp.Send(loginInfo);
loginInfo.To.Add(txt_email.Text.ToString()); loginInfo.From = new MailAddress("my email id");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)