I now iterate over the datareader and call the System.Net.Mail.SmtpClient Send () method. The problem is that it is slow. Each letter takes about 5-10 seconds to send (perhaps this is only a problem with my host). I had to override the defaultTimeout executable in the web.config file (default is 90 seconds):
<httpRuntime executionTimeout="3000" />
One caveat: I am on a shared host, so I don’t think it is possible for me to use the PickupDirectoryFromIis parameter (at least it gave me errors when I turned it on).
source
share