title: .Net System.Mail.Message adding multiple "To" addresses
body: <p>This question is pointless, except as an exercise in red herrings. The issue turned out to be a combination of my idiocy (NO ONE was being emailed as the host was not being specified and was incorrect in <code>web.config</code>) and the users telling me that they sometimes got the emails and sometimes didn't, when in reality they were NEVER getting the emails.**</p>
  <p><strong>So, instead of taking proper steps to reproduce the problem in a controlled setting, I relied on user information and the &quot;it works on my machine&quot; mentality.
  Good reminder to myself and anyone else out there who is sometimes an idiot.</strong></p>
  <hr />
  <p>I just hit something I think is inconsistent, and wanted to see if I'm doing something wrong, if I'm an idiot, or...</p>
  <pre><code>MailMessage msg = new MailMessage();
  msg.To.Add(&quot;person1@example.com&quot;);
  msg.To.Add(&quot;person2@example.com&quot;);
  msg.To.Add(&quot;person3@example.com&quot;);
  msg.To.Add(&quot;person4@example.com&quot;);
  </code></pre>
  <p>Really only sends this email to 1 person, the last one.</p>
  <p>To add multiples I have to do this:</p>
  <pre><code>msg.To.Add(&quot;person1@example.com,person2@example.com,person3@example.com,person4@example.com&quot;);
  </code></pre>
  <p>I don't get it. I thought I was adding multiple people to the <code>To</code> address collection, but what I was doing was replacing it.</p>
  <p>I think I just realized my error -- to add one item to the collection, use
  .To.Add(new MailAddress(&quot;person@example.com&quot;))</p>
  <p>If you use just a <code>string</code>, it replaces everything it had in its list.
  Other people have tested and are not seeing this behavior. This is either a bug in my particular version of the framework, or more likely, an idiot maneuver by me.**</p>
  <p>Ugh. I'd consider this a rather large gotcha! Since I answered my own question, but I think this is of value to have in the Stack Overflow archive, I'll still ask it. Maybe someone even has an idea of other traps that you can fall into.</p>