Rebex.Mail throws Rebex.Mail.MailException: Invalid TNEF message for certail EML files

0 votes
asked Sep 6, 2012 by minam365 (120 points)
edited Nov 5, 2012

Error occurs while loading an EML data either from a stream or a file as shown below:

                    mailMessage = new MailMessage();

The same EML file can be opened by Outlook.

Rebex.Mail.MailException: Invalid TNEF message. ---> System.IO.EndOfStreamException: Unable to read beyond the end of the stream.<br>
   at System.IO.BinaryReader.ReadByte()<br>
   at ZjHgK.1Bb0QeZ.2fbsAmZ(BinaryReader , Int32 , Boolean , Boolean )<br>
   at ZjHgK.1Bb0QeZ.1klNF2Z(BinaryReader , Boolean )<br>
   at ZjHgK.1Bb0QeZ.gEHb0(BinaryReader )<br>
   at ZjHgK.1Bb0QeZ.1v2ciGZ(Stream )<br>
   at ZjHgK.1Bb0QeZ.1rsOcLZ(MailMessage , Boolean )<br>
   at Rebex.Mail.MailMessage.1iiF1n(MimeEntity )<br>
   --- End of inner exception stack trace ---<br>
   at Rebex.Mail.MailMessage.1iiF1n(MimeEntity )<br>
   at Rebex.Mail.MailMessage.1FQJIgZ(MimeMessage )<br>
   at Rebex.Mail.MailMessage..ctor(MimeMessage message)<br>
   at Rebex.Samples.MimeExplorer.MimeExplorer.itemOpen_Click(Object sender, EventArgs <br>e) in C:\\Rebex\\Samples\\vs2010-net-4.0\\Mail\\MimeExplorer_CS\\MimeExplorer.cs:line 263<br>

I appreciate any help/resolution. How can I upload the EML file that is causing this problem?


Muhammed Inam, MsComS(USA)

applied technologies GmbH phone: +49 (201) 8127 - 364

========================================================================= applied technologies Gesellschaft für angewandte Informationstechnologien mbH Kruppstrasse 82-100, 45145 Essen, Germany Phone: +49 (201) 8127-334, Fax: +49 (201) 8127-346 Sitz der Gesellschaft: Essen, Handelsregister: Amtsgericht Essen HRB 15778 Geschäftsführer: Dipl.-Ing. Bernd Gerwert, Dietmar Leibecke, Dipl.-Ing. Daniel Saager

Applies to: Rebex Secure Mail
commented Sep 6, 2012 by Martin Vobr (12,950 points)
edited Sep 6, 2012

Instead of uploading the EML file that is causing the problem you can send it to Please ZIP the eml file first in order to make sure that it's not modified during transfer.

1 Answer

0 votes
answered Sep 7, 2012 by Tomas Knopp (58,890 points)
edited Nov 5, 2012

Thank you for sending the eml to us. We have discovered that the exception is a bug caused by incorect implementation of padding in TNEF multi-value fields. A hotfix is available on demand.

Update: This was fixed in Rebex Secure Mail 2012 R3.