title: Attachment without filename
body: <p>When using the System.Net.Mail namespace to send a e-mail with attachment to any Yahoo account the attachment is downloaded with 'untitled' name instead the file name.</p>
  
  <p>In the Yahoo Mail interface the attachment looks with the correct name but when you download it the download name goes to 'untitled' for all attachments. The same e-mail message works fine with Gmail, Outlook.com, Windows Live Mail and other clients.</p>
  
  <p>Looking the raw message it constains a content-type with name but without filename attribute. The Yahoo works fine if the filename attribute is set but C# library don't use this.</p>
  
  <p>That's the header generated by C# for attachments:</p>
  
  <pre><code>Content-Type: application/octet-stream; name=test.pdf
  </code></pre>
  
  <p>That's the header that works with Yahoo:</p>
  
  <pre><code>Content-Type: application/octet-stream; name=file2; filename=test.pdf
  </code></pre>
  
  <p>Anyone get this problem so far? Is there a work arround for C# default mail sending?</p>
  
  <pre><code> using (var message = new MailMessage("from@domain", "to@yahoo.com.br", "Test with attachment", "Test with attachment"))
      {
          var attachment = new Attachment(@"c:\temp\test.pdf"); // Same result using stream instead path to file.
          attachment.Name = "test.pdf"; // Same result without this line.
          message.Attachments.Add(attachment);
  
          using (var smtp = new SmtpClient("smtp.domain", 587))
          {
              smtp.Credentials = new NetworkCredential("from@domain", "password");
              smtp.Send(message);
          }
      }
  </code></pre>