System.Diagnostics.Stopwatch sWatch = new System.Diagnostics.Stopwatch();
sWatch.Start();
MailMessage mail = new MailMessage();
MailMessage mailAdmin = new MailMessage();
SmtpClient SmtpServer = new SmtpClient();
mail.From = new MailAddress("[email protected]");
mail.To.Add([email protected]);
mail.Subject ="faster Sending email";
mail.Body = htmlProcessed;
mail.IsBodyHtml = true;
SmtpServer.Host = smtp.gmail.com";
SmtpServer.Port = 25;
//SmtpServer.Timeout = 10000;
SmtpServer.Credentials = new System.Net.NetworkCredential("test@your'smail.com", "123@123");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);
result = true;
// LogFile(Convert.ToString(mail.From), Convert.ToString(mail.To), result);
sWatch.Stop();In this code we will learn about Send Mail Faster using C#.