jstedfast / MailKit

A cross-platform .NET library for IMAP, POP3, and SMTP.
http://www.mimekit.net
MIT License
6.04k stars 809 forks source link

Regression: Nested signed mail showed as nameless.eml #1726

Closed minimalisticMe closed 4 months ago

minimalisticMe commented 4 months ago

Describe the bug When extracting a mail with multiple nested mails (mail attachments) I can extract all mails correctly, but one mail is named incorrectly. One of the attached mails is a singed mail and the name of this mail is "Nameless.eml" instead of the correct name. This was working correctly on a prior version (I am not sure which one, maybe 3.6.0?).

Platform (please complete the following information):

Exception No exception, just incorrect parsing.

To Reproduce Is there a way to share the mail securely? It contains personal data of me.

Expected behavior The name of the attached signed mail is read correctly.

Code Snippets

var eml = MsgReader.Mime.Message.Load(stream);
foreach (var item in eml.Attachments)
{
     if (item.IsAttachment)
     {
         var originalFilename = item.FileName; // wrong in one of the attachments
     }
}
jstedfast commented 4 months ago

You can zip it up and email it to me:

jestedfa@microsoft.com

minimalisticMe commented 4 months ago

I just sent the mail.

jstedfast commented 4 months ago

Looks like this isn't a MimeKit or MailKit bug.