Send Mail Faster using C#

  1. System.Diagnostics.Stopwatch sWatch = new System.Diagnostics.Stopwatch();  
  2. sWatch.Start();  
  3. MailMessage mail = new MailMessage();  
  4. MailMessage mailAdmin = new MailMessage();  
  5. SmtpClient SmtpServer = new SmtpClient();  
  6. mail.From = new MailAddress("[email protected]");  
  7. mail.To.Add([email protected]);  
  8. mail.Subject ="faster Sending email";  
  9. mail.Body = htmlProcessed;  
  10. mail.IsBodyHtml = true;  
  11. SmtpServer.Host = smtp.gmail.com";  
  12. SmtpServer.Port = 25;  
  13. //SmtpServer.Timeout = 10000;  
  14. SmtpServer.Credentials = new System.Net.NetworkCredential("test@your'smail.com""123@123");  
  15. SmtpServer.EnableSsl = false;  
  16. SmtpServer.Send(mail);  
  17. result = true;  
  18. // LogFile(Convert.ToString(mail.From), Convert.ToString(mail.To), result);  
  19. sWatch.Stop();