bertjohnson/OpaqueMail

Wrong TNEF-Attachment Title

Closed this issue · 3 comments

Hello,

at first, thanks for your great work!
I'm trying to extract an attachment from an TNEF winmail.dat.
This works great but it seems there is a wrong file name.

Here a short snipping from the winmail.dat content (in a editor):
tnef_att_title

Your code (MimePart.Name) extracts the filename ".PDF File.pdf".
The correct filename (like Outlook or Thunderbird with extension reads it) is "BST204DE.pdf".

Is there an easy way to get the correct filename?

Now, I use MimeKit and it works.
Thanks!

Thanks for the report, Chatfix. Glad you were able to quickly pivot to MimeKit and that it worked out for you. That's probably the best and most complete .NET library for MIME.

I'd like to fix this in OpaqueMail, but wasn't able to recreate the problem with any "winmail.dat" / TNEF-encoded files I have. If you could, please send a problematic file to bert AT opaquemail DOT org and I'll troubleshoot. Thanks.

Hi,

thanks for your reply, but I'm not allowed to send you an private file from my company.
Maybe this helps: MimeKit converts the TNEF part and adds the following headers of attachment in eml-sourcecode:

Content-Type: application/octet-stream; name=".PDF File.pdf"
Content-Disposition: attachment; filename=BST204DE.pdf;
	creation-date="Fri, 18 Sep 2015 16:17:40 +0200";
	modification-date="Fri, 18 Sep 2015 16:17:40 +0200"
Content-Transfer-Encoding: base64