System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient("mail.sample.co.uk", 25); smtpClient.Credentials = new System.Net.NetworkCredential("smtpuser@sample.co.uk", "pass@123"); smtpClient.UseDefaultCredentials = true; smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; smtpClient.EnableSsl = false; System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(); //Setting From , To and CC mail.From = new System.Net.Mail.MailAddress("smtpuser@sample.co.uk", "MyWeb Site"); mail.To.Add(new System.Net.Mail.MailAddress("myemail@gmail.com")); mail.CC.Add(new System.Net.Mail.MailAddress("myemail1@gmail.com")); smtpClient.Send(mail); Response.Write("mail send!!!!!!!");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)