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

Free Support Forum - aspose.com

MapiMessage as attachment

I am having a problem when saving a .msg file to the file system and then using the saved .msg as an email attachment. When a new email message is created, the saved.msg file is attached and the email is sent successfully. When the recipient gets the message the .msg attachment is missing. I have tested and this only happens with .msg files saved using Aspose.Network. My company uses Microsoft Outlook 2003 as the default mail client (cached mode). The error message below was recorded by Exchange.

There is corruption in rich text format (RTF).

Compressed RTF size 0x7de.Extra data: dwMagic 0x414c454d. size 0x7d2, raw size 0x7ce, CRC-32 0x5099441c.

My application retrieves a message from exchange, converts to .msg and then calls the Save method of the MapiMessage class to save to the file system. This is an example of the code I am using.

Dim xClient As Exchange.ExchangeClient = Nothing
Dim mail As Aspose.Network.Mail.MailMessage = Nothing
Dim outlook As Outlook.MapiMessage = Nothing

xClient = New Exchange.ExchangeClient(Me.MailLocation, New Net.NetworkCredential("", ""))

'Return message from exchange.
mail = xClient.FetchMessage("")

'Convert to .msg format.
outlook = Aspose.Network.Outlook.MapiMessage.FromMailMessage(mail)

'Save to file system.
outlook.Save("")

regards,

Robert

Hi Robert,

Could you please attach a sample project for us to reproduce the problem at our end?

I did the following, but was unable to reproduce this:

  1. Create an msg file and save it to disk
  2. Create an instance of MailMessage and add the attachment (above msg file)
  3. Send it using ExchangeClient
  4. Download the message using Outlook 2003
The message was successfully downloaded by Outlook 2003 with msg attachment. I also checked it with Outlook web client (IE), the message also showed msg attachment.

I used Windows 2003 Server x86, Exchange Server 2003, Office Outlook 2003, Aspose.Network 5.3 and .NET framework 2.0.

The sample project that I used for testing is also attached.

Hello,

Could you try this again using Outlook 2003 in cached mode please?

Robert

Hello,

Are there any updates on this? It is a major issue for my project.

Robert

Hi Robert,


I tried again using MS Office Outlook 2003 Cached mode (Download Full Items), but I still could not reproduce the problem with Aspose.Network for .NET latest version 5.3.1.

Could you please post your sample project to create the msg attachment and send to Exchange?

Thanks for the reply,

I will try to explain further. I am not sending the email messages through my application.

My application retrieves messages from exchange, converts to msg format and saves to the file system using the code in my first post.

The users manually create an email message, browse and attach the saved .msg file and send the email message using the Outlook 2003 client. (cached mode.) This is where the problem occurs.

Robert

Hello,

Are there any updates on this? I need a resolution for this by 25/06/2010 or my project is in serious trouble and I will have to look at alternative solutions.

Robert

Hi Robert,


Thanks for clarifying the scenario. I have reproduced the issue at my end and also logged this in our bug tracking system (ID: 17950). We will look into it and inform you when there is a fix available. Sorry for the inconvenience.

Hi Robert,


Please find the attached hotfix dll. This should solve the problem with Outlook and Exchange 2003.

Hello,

I have tested using the hotfix dll and I am still having issues.

When a user sends an email containing a msg attachment generated by Aspose.Network, the recipient gets the email with no body text or msg attachment, only a winmail.dat file is attached? The subject line also has '[UNSCANNED]' appended.

I have attached a msg file generated by Aspose.Network (Aspose_generated.msg) and also a copy of the received email with the winmail.dat file (Received_email_example.msg).

Robert

Hi,


I am sorry I could not reproduce the issue with the attached hotfix. I tried the same scenario using the approaches below, but the msg attachment with email body was coming correctly.
  1. With default installation of Outlook 2003 and Exchange Server 2003 on a Windows 2003 Server x86 standard edition
  2. Fully updated Windows Server 2003, installed Exchange Server 2003 SP2 and Office 2003 SP3
  3. Tested with a saved msg using my own Exchange Server
  4. Tested with the attached msg file (Aspose_Generated.msg)
Could you please verify that you are using the attached dll v 5.3.1.1?

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.