MailMessage message = new MailMessage(); SmtpClient smtp = new SmtpClient(); message.From = new MailAddress("abc@abc.com"); message.To.Add(new MailAddress("" + dataGridView1.Rows[kk].Cells[2].Value.ToString() + "")); message.Subject = ""+tb_subject.Text+""; message.Body = ""+tb_ptrank.Text+ Environment.NewLine+ tb_body.Text+""; smtp.Port = 587; smtp.Host = "smtp.gmail.com"; smtp.EnableSsl = true; smtp.UseDefaultCredentials = false; smtp.Credentials = new NetworkCredential("email", "pwd"); smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.Send(message);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)