Friday, September 7, 2007

Send the mail using Threading

string sException;
sException = ex.ToString();
SendEmail myMail = new SendEmail();
myMail.SendEmailError(sException + " Time: " + DateTime.Now.ToString());
Thread thread = new System.Threading.Thread(new ThreadStart(sendMailFunction));
//SendMailWithProjectDetails(workOrderId, projectDetailMail)));
thread.Priority = ThreadPriority.Highest;
thread.Start();
Response.Redirect("DefaultErrorPage.aspx");

No comments: