title: How do you send mass emails from ASP.NET?
body: <p>I built a website for a client and they would like a custom newsletter tool. Building the tool was easy, but I'm not sure how to send the email.</p>
  
  <p>I set up a test page and managed to send a test email to myself using the System.Net.Mail namespace. I tried applying this code to a loop on the newsletter page, but it's turning out to be quite a difficult task. The email sending loop locks up the whole site for about an hour while it sends its emails. Sometimes it will abort the loop midway and some of the emails won't get sent.</p>
  
  <p>I tried starting the loop on another thread.</p>
  
  <pre><code>protected void btnSendNewsletter_Click(object sender, EventArgs e)
  {
      Thread t = new System.Threading.Thread(new ThreadStart(SendEmails));
      t.Start();
  }
  </code></pre>
  
  <p>but this still makes the site go slow and also has a habit of aborting part way through. What is the common method for sending mass emails? I'm sure I'm not doing it right.</p>
  
  <p>I am very new to the email arena in .NET.</p>