MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress("mohsin.paracha44@gmail.com"); mail.To.Add("mohsin_paracha02@yahoo.com"); mail.Subject = "Test Mail"; mail.Body = "This is for testing SMTP mail from GMAIL"; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential("Mohsin Paracha", "convents"); SmtpServer.EnableSsl = true; SmtpServer.Send(mail); Label1.Text="mail Send";
new System.Net.NetworkCredential("yourgooglemailname@gmail.com", "yourPassword");
"@gmail.com"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)