Invalid TNEF message

+1 vote
asked Feb 28, 2012 by Blake Mitchell (160 points)
edited Dec 9, 2014

I am getting the following exception when trying to load a message using Rebex Mail version 1.0.4086.0:

Exception Type: Rebex.Mail.MailException
Exception Message: Invalid TNEF message.
Exception Data: [MM.ErrorTag] = CUPS1NQBKMQR5YYFF4YMHJDYFA
Stack Trace:
    at Rebex.Mail.MailMessage.BlsmEj(MimeEntity )
    at Rebex.Mail.MailMessage.Load(Stream input)
    at MM.Import.Biz.Stream.SourceSmtp.MessageReceived(SmtpMessageReceivedEventArgs ea, String acceptedRecipient, String unknownSenderRecipient, String noAttachmentRecipient, OperatingContext op)

Exception Type: System.ArgumentException
Exception Message: Invalid character at position 2.
Parameter name: name
Stack Trace:
    at Rebex.Mail.Attachment.SetContent(Stream source, String name, String mediaType)
    at bkfOwD.bXzAGmZ.clLXPXZ(Stream )
    at bkfOwD.bXzAGmZ.cDtmAOZ(MailMessage , Boolean )
    at Rebex.Mail.MailMessage.BlsmEj(MimeEntity )

The message (and attachment) open without issue using Outlook, so I'm at an impass on how to diagnose the issue. Any suggestions? (The MM.ErrorTag exception data is set by my own error handling code.)

Applies to: Rebex Secure Mail
commented Feb 29, 2012 by Lukas Pokorny (126,950 points)
edited Feb 29, 2012

We are about to release a new version of Rebex Mail in a few days and it is quite possible it will fix this issue. I just sent a link to a beta package to your e-mail - please give it a try and let us know whether it solves the problem.

commented Mar 5, 2012 by Blake Mitchell (160 points)
edited Mar 5, 2012

The results were the same with the beta package, only the obfuscated names changed. I can share the source mail message with Rebex support, but it's contents must be kept confidential.

commented Mar 6, 2012 by Lukas Pokorny (126,950 points)
edited Dec 9, 2014

Thanks! Please send the source e-mail message to, preferably in a ZIP archive to prevent any mailservers along the way from modifying it.

1 Answer

0 votes
answered Mar 9, 2012 by Lukas Pokorny (126,950 points)
edited Jun 11, 2012
Best answer

Update: This issue has been solved in Rebex Secure Mail 2012 R2.

This issue has will be solved in Rebex Secure Mail 2012 R2. A hotfix is available for Rebex Secure Mail 2012 R1 - please let us know at if you would like to give it a try.