title: Stream closed error when adding attachment to MailMessage
body: <p>I use the following code to attach a file to an email message.</p>
  
  <pre><code>msg = new MailMessage();
  
      using (strMem = new MemoryStream((byte[])attDr["filedata"]))
      {
          using (strWriter = new StreamWriter(strMem))
          {
              strWriter.Flush(); strMem.Position = 0;
              using (attachment = new Attachment(strMem, attDr["filename"].ToString()))
              {
                  msg.Attachments.Add(attachment);
              }
          }
      }
  
  ...
  ...
  msg.Send();  //Error: System.ObjectDisposedException: Cannot access a closed Stream.
  </code></pre>
  
  <p>The error message is: //Error: System.ObjectDisposedException: Cannot access a closed Stream</p>
  
  <p>Im guessing that the "USING" statement closes the stream when exiting the block. But why doesnt "Attacments.Add()" make its own copy of the stream?</p>