Simple case,
Review with attached example solution.
I have an existing message called (original.msg).
This message has an attachment which is a word document (OfflineTest.docx)
If I open the original.msg file I can open the attached docx file. - Success.
Using aspose I create a new PST file (generated.pst) and add the original.msg file.
using (PersonalStorage pst = PersonalStorage.Create(pstLocation, FileFormatVersion.Unicode))
{
var mapiMessage = MapiMessage.FromMailMessage(msgFileToPackage);
pst.RootFolder.AddMessage(mapiMessage);
}
When I then either try and add the PST file into outlook OR extract the message using Aspose. When opening the attachment of the email i get an error. (This error only applies on the new version of the msg and not the original).
To reproduce, extract solution, run the test goto the bin/debug folder, open the extracted.msg file and try an open the word attachment. (Attached for reference)
Thanks,
Dave