<p>I'm currently looping through a datareader and calling the System.Net.Mail.SmtpClient's Send() method. The problem with this is that it's slow. Each email takes about 5-10 seconds to send (it's possible this is just an issue with my host). I had to override the executionTimeout default in my web.config file (it defaults to 90 seconds) like this:</p>

<pre><code> &lt;httpRuntime executionTimeout="3000" /&gt;
</code></pre>

<p>One caveat: I'm on a shared host, so I don't think it is possible for me to send using the PickupDirectoryFromIis option (at least, it gave me errors when I turned it on).</p>

[{'answer_id': 56988, 'author': 'Espo', 'author_id': 2257, 'author_profile': 'https://Stackoverflow.com/users/2257', 'pm_score': 4, 'selected': True, 'text': '<p>You could send the mail asynchronous. That way the timeout should not interrupt your sending.</p>\n\n<p>This article should help you get started with that: <a href="http://www.eggheadcafe.com/articles/20030720.asp" rel="nofollow noreferrer">Sending Emails Asynchronously in C#</a>.</p>\n\n<p>There is another approach here: <a href="http://www.vikramlakhotia.com/Sending_Email_asynchronously_in_AspNet_20.aspx" rel="nofollow noreferrer">http://www.vikramlakhotia.com/Sending_Email_asynchronously_in_AspNet_20.aspx</a></p>\n\n<p>And off course there are several commercial clients available, but the only one that i have tried and can recommend is <a href="http://www.aspnetemail.com/" rel="nofollow noreferrer">http://www.aspnetemail.com/</a></p>\n'}, {'answer_id': 57009, 'author': 'Ryan Farley', 'author_id': 1627, 'author_profile': 'https://Stackoverflow.com/users/1627', 'pm_score': 0, 'selected': False, 'text': '<p>Definitely spawn it off on a background worker process so they go out asynchronously.   </p>\n\n<p>BTW, 5-10 seconds per e-mail seems way slow to me. On my server it takes just fractions of a second per e-mail. </p>\n'}]
['https://Stackoverflow.com/questions/56975', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4965/']