Hai guys,
I had the following code to send different mails to differnt users in my asp.net web application
foreach (DataRow dataRow in dataTable.Rows
It would probably be better to structure your method like this:
public void SendMails(DataTable dt) { foreach (DataRow row in dt.Rows) { // send emails } }
And then call it like this:
SendMails(dataTable);
Or call the method with a BackgroundWorker so that your UI doesn't lock up.
BackgroundWorker