using (MailMessage mm = new MailMessage("trial@gmail.com", trialEmail.Text)) { mm.Subject = "Send test"; string body = "Hello " ; mm.Body = body; mm.IsBodyHtml = true; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.EnableSsl = true; NetworkCredential NetworkCred = new NetworkCredential("trial@gmail.com", "password"); smtp.UseDefaultCredentials = true; smtp.Credentials = NetworkCred; smtp.Port = 587; smtp.Send(mm); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)