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