You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
TnefPart.ConvertToMessage() adds unnecessary Multipart MimeEntity for signed TNEF Messages with an encoded body. This Multipart then contains only one child. This is new since MimeKit 3.2 and causes that Outlook no longer properly displays the message.
Platform (please complete the following information):
OS: Windows 11
.NET Runtime: CoreCLR
.NET Framework: [.NET 4.8.2, .NET 5.0]
MimeKit Version: 3.2
To Reproduce
Steps to reproduce the behavior:
Download and extract the attached "NoContentAfterTnefToMimeConversion.zip"
Open the extracted "NoContentAfterTnefToMimeConversion.sln"
Build and Exeute the contained "MimeKit_3_2" project
Open the "TnefPartConvertedToMessage.eml" that has been generated in outlook
Expected behavior
The content of the mail is Displayed and the mail is marked as a signed mail.
Code Snippets
If applicable, add code snippets to help explain your problem.
classProgram{staticvoidMain(string[]args){usingvarmessage= ParseMessage("SignedTnefMailWithEncodedBody.eml");usingvartnefPart=(TnefPart) message.BodyParts.First(x => x is TnefPart);varconvertedTnefPart= tnefPart.ConvertToMessage();
SaveMessage(convertedTnefPart,"TnefPartConvertedToMessage.eml");}privatestaticvoidSaveMessage(MimeMessageconvertedTnefPart,stringfileName){usingvartnefPartConvertedToMessage= File.OpenWrite(fileName);
convertedTnefPart.WriteTo(FormatOptions.Default, tnefPartConvertedToMessage);}privatestatic MimeMessage ParseMessage(stringfileName){usingvarsignedTnefMailWithEncodedBody= File.OpenRead(fileName);varmimeParser=new MimeParser(signedTnefMailWithEncodedBody);return mimeParser.ParseMessage();}}
Additional context
I have attached a solution to demonstrate the issue: "NoContentAfterTnefToMimeConversion.zip"
The solution contains a project that uses MimeKit 3.1.1 which works as expected and one that uses MimeKit 3.2 which shows the problem. NoContentAfterTnefToMimeConversion.zip
The following screenshot shows how it looks with MimeKit 3.2
The following screenshot shows how it should look like in Outlook (MimeKit 3.1.1)
The following screenshot shows the difference of the EML files that are generated by MimeKit 3.1.1 and 3.2.
The text was updated successfully, but these errors were encountered:
Describe the bug
TnefPart.ConvertToMessage() adds unnecessary Multipart MimeEntity for signed TNEF Messages with an encoded body. This Multipart then contains only one child. This is new since MimeKit 3.2 and causes that Outlook no longer properly displays the message.
Platform (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The content of the mail is Displayed and the mail is marked as a signed mail.
Code Snippets
If applicable, add code snippets to help explain your problem.
Additional context
I have attached a solution to demonstrate the issue: "NoContentAfterTnefToMimeConversion.zip"
The solution contains a project that uses MimeKit 3.1.1 which works as expected and one that uses MimeKit 3.2 which shows the problem.
NoContentAfterTnefToMimeConversion.zip
The following screenshot shows how it looks with MimeKit 3.2
The following screenshot shows how it should look like in Outlook (MimeKit 3.1.1)
The following screenshot shows the difference of the EML files that are generated by MimeKit 3.1.1 and 3.2.
The text was updated successfully, but these errors were encountered: