Invalid TNEF Message

0 votes
asked Sep 27 by 3P (270 points)

When I try to download message using Imap.GetMailMessage(int sequenceNumber) I get "Invalid TNEF message" error.

Rebex.Mail.MailException: Invalid TNEF message. ---> System.ArgumentException: Media type is not valid.
Parameter name: mediaType
   at Rebex.Mime.Headers.ContentType..ctor(String mediaType)
   at Rebex.Mime.MimeEntity.rjfp(Stream qx, String qy, String qz, ContentTransferEncoding ra)
   at Rebex.Mail.Attachment.aoyn(Stream aij, String aik, String ail, Boolean aim)
   at uvpc.fnus(Stream arz)

In thunderbird this e-mail is displayed correctly. It contains winmail.dat attachment. In message source I see it like this:

--_000_05e79afdf8aa458597f6ab9d7453668epostch_
Content-Disposition: attachment; filename="winmail.dat"
Content-Transfer-Encoding: base64
Content-Type: application/ms-tnef; name="winmail.dat"

Is this a bug in Rebex?

Applies to: Rebex Secure Mail
commented Oct 2 by 3P (270 points)
Can I expect any support?
commented Oct 8 by 3P (270 points)
Can you help me with this case?
commented 2 days ago by Lukas Pokorny (102,250 points)
Sorry for not replying earlier. We were not aware of your questions due to a configuration issue with one of our servers. This has now been fixed and it should not happen again. (And if it does, please notify us via e-mail if you don't get an answer within two business days.)

1 Answer

0 votes
answered 2 days ago by Lukas Pokorny (102,250 points)

The error is not related to winmail.dat's content type, but rather to a content type of one of the attachments that are inside the winmail.dat (TNEF) message in one of its PR_ATTACH_MIME_TAG properties. It is most likely invalid (which would make this not a bug), but we can easily work around it by using the 'application/octet-stream' media type instead. We'll include this workaround in our next release. Thanks for letting us know about this!

commented 11 hours ago by 3P (270 points)
Is there a way to track new versions and what's included? I'm waiting for other fixes/changes too.
commented 10 hours ago by Lukas Matyska (55,430 points)
You can be notified via email about new versions. Just register at https://rebex.us5.list-manage.com/subscribe?u=6e0e34c882602d1cf12bc584b&id=e7c9ad3959

You can also follow us on https://www.twitter.com/rebexnet or https://www.facebook.com/rebex.net

You can subscribe to our https://blog.rebex.net

The information about fixes/changes are always available at https://www.rebex.net/total-pack/history.aspx
...