title: Python: How can I change the "to" field in smtp/MIME script rather than adding a new one?
body: <p>Here's an excerpt from the code I'm using.  I'm looping through the part that adds the email; my problem is rather than changing the "to" field on each loop, it is appending the "to" data.  Obviously this causes some issues, since the to field ends up getting longer and longer.  I tried msgRoot.del_param('To') to no avail.  I even tried setting the msgRoot['To'] to refer to the first index of a list so I could simply change the value of that list item (also didn't work).</p>
  
  <pre><code>from email.MIMEMultipart import MIMEMultipart
  msgRoot = MIMEMultipart('related')
  msgRoot['To'] = 'email@email.com'
  </code></pre>