We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

TNEF issue resulting in NDR from Exchange

Aspose.Email version: 16.12.0.

Environment: Exchange 2010 SP1 and MS Outlook 2010. Our Exchange transport agent performs some manipulations with messages (like changing attachment name etc.) using Aspose.Email.dll. PreserveTnef is used when saving processed message.

Scenario: User creates message in Outlook; adds 25 PDFs and sends internal message.

Issue: Aspose.Email somehow changes message structure and Exchange cannot process message afterwards. User receives NDR.

NDR (message is attached):

#554-5.6.0 Corrupt message content 554 5.6.0 STOREDRV.Deliver.Exception:ConversionFailedException; Failed to process message due to a permanent exception with message Content conversion: Corrupt summary TNEF content. ConversionFailedException: Content conversion: Corrupt summary TNEF content. ##

There were no issue on Aspose.Email 6.6.0.0.

Unfortunately, you need lab with Exchange transport agent in order to replicate the issue. Though you may already have it after testing the following issue




Also I found another issue that, I think, is a result of the same bug.

Scenario: I use EWSClient to send the same message, that resulted in an NDR in the environment with Exchange transport agent. This time NDR is not generated, but Exchange still considers TNEF part to be invalid, because Outlook shows "winmail.dat" attachment instead of a list of PDFs. If I use Aspose.Email 6.6.0.0 - no issue.

Attached sample project to demonstrate, that message comes with winmail.dat attachment.

Thanks,
Alex Shloma

Hi Alex,


Thank you for writing to Aspose Support team.

We are currently working over the issues and will soon share our findings with you here. We appreciate your patience in this regard.

Hi Alex,

We investigated your shared project and were able to observe your second issue when sending message using EWSClient. Using the latest version 17.1.0, TNEF attachments are sent as a single winmail.dat file, which is incorrect behavior compared to previous version 6.6.0. We have logged this issue for further investigation by our product team as EMAILNET-38612. We’ll let you know once there is any further information or a fix version available in this regard.

Hi Alex,

We need some more information from your end for the NDR issue, since we are not able to replicate the scenario with the information available.

licenses@litera.com:

Environment: Exchange 2010 SP1 and MS Outlook 2010. Our
Exchange transport agent performs some manipulations with messages
(like changing attachment name etc.) using Aspose.Email.dll.
PreserveTnef is used when saving processed message.



We loaded your provided sample message included in the test project and sent it after manipulating the attachments but no NDR was received. Can you please share your sample code used to process the message. This will help us to analyze the issue further and assist you better.

Hi,


What environment do you have? I need Exchange version and SP.

Then I will provide you with a sample project of exchange transport agent.

Alex

Hi,


We investigated your shared project and were able to observe your second issue when sending message using EWSClient. Using the latest version 17.1.0, TNEF attachments are sent as a single winmail.dat file, which is incorrect behavior compared to previous version 6.6.0. We have logged this issue for further investigation by our product team as EMAILNET-38612. We’ll let you know once there is any further information or a fix version available in this regard.

Assume that winmail.dat must be preserved, because message is read using PreserveTnefAttachments flag. The issue is that winmail.dat attachment is corrupted somehow (not fully fits Microsoft’s specification) and as a result Exchange does not parse it to show attachments inside winmail.dat.

Thanks,
Alex

Hi Alex,


We have logged your NDR issue as EMAILNET-38614 for further investigation by our Product team and will update you here once there is further information available in this regard. However, you can still attach your sample application that we can attach to the ticket for assisting our Product team wit their investigation.

Hi


kashif.iqbal:
We have logged your NDR issue as EMAILNET-38614 for further investigation by our Product team and will update you here once there is further information available in this regard. However, you can still attach your sample application that we can attach to the ticket for assisting our Product team wit their investigation.

I can provide sample project. That would be exchange transport agent, that is why I asked what environment you have (I need version and SP of Exchange server, because different libraries must be included depending on this information).

I will also provide instruction on how to install agent, but first please give me information requested above.

Regards,
Alex

Hi,

I attached sample project of Exchange transport agent. It contains DLLs for different versions of the Exchange server. Change reference to Microsoft.Exchange.Data.Transport.dll according to your environment.


Reminder: I tested in on Exchange 2010 SP1 and Aspose 16.10.0.0.


As you may see it simply reads message using MailMessage class, changes subject, saves message to the memory stream and replaces content of original exchange messages with a new one.


Instruction on installing agent

  1. Open solution that I provided.
  2. Change reference to Microsoft.Exchange.Data.Transport.dll if needed.
  3. Recompile project
  4. RDP remote Exchange server
  5. Open c:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\agents\RoutingAgents folder. Highlighted part depends on the version of Exchange server installed (Exchange 2010 in my case).
  6. Create TestRoutingAgent folder.
  7. Copy entire content of Release/Debug folder to TestRoutingAgent folder.
  8. Launch Exchange Management Shell.
  9. Execute command
    cd “c:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\agents\RoutingAgents\TestRoutingAgent”
  10. Execute install.ps1 script, that will stop Transport service, register agent, enable agent and start transport service
  11. Send test message using Outlook or OWA. Log file must be created in c:\ProgramData\Test Agent Log


To replicate the issue

  1. RDP machine with Outlook
  2. Copy sample PDF to the machine
  3. Make 25 copies of sample PDF
  4. Open Outlook and Create new message
  5. Attach 26 PDFs and hit Send button

Thanks,
Alex

Hi Alex,

Thank you for providing the sample project and additional details to reproduce the issue. We have forwarded the details and sample project to product team. We’ll let you know once there is further information available in this regard.

Hi,


Were you able to reproduce the issue?

Thanks,
Alex

Hi Alex,


The issue is still pending for analysis by our Product team. We’ll update you here as soon as there is some information available in this regard.

The issues you have found earlier (filed as EMAILNET-38612) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as EMAILNET-38614) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Nice, thanks guys.


Will post the results once testing is done on my side.

Hi,


Sure. Please feel free to share your feedback with us once you are done with your testing.