I'm getting a timeout error after 100 seconds when sending an email with 87 recipients on the CC list. Just want to ask if below code will send an email asynchronously or will the application thread waits for the response for the sending of email process. Thanks.
SmtpClient mailClient = new SmtpClient(Server, Port);
Thread t = new Thread(delegate()
{
try
{
mailClient.Send(mail);
}
catch (Exception ex)
{
LogHelper.LogError(ex);
}
});
t.Start();
Pankaj PandeyPosted May 6, 2013, 6:41 AM
First this method need to thread wait.
One more option is here for prevent timeout error.
Go to web.config file and add given script..may be it helps
put in web.config file
Jayzle CoballesPosted May 6, 2013, 5:06 AM
Pankaj PandeyPosted May 6, 2013, 4:55 AM
after that you send next mail.