@navnath44,
Our development team investigated the issue. The problem is that the Content-Location header in the EML file contains “cid:” characters that should not be. Starting version 21.9, you will be able to add the EML file to a PST file correctly by using a MapiMessage
object as shown below:
var message = MailMessage.Load(folderPath + "1edface3-e955-47f5-8d5e-44040ef6c362.eml");
using (var pst = PersonalStorage.Create(folderPath + "test.pst", FileFormatVersion.Unicode))
{
var folderInfo = pst.RootFolder.AddSubFolder("TestFolder");
var conversionOptions = new MapiConversionOptions(OutlookMessageFormat.Unicode);
folderInfo.AddMessage(MapiMessage.FromMailMessage(message, conversionOptions));
}
Documents: Working with Messages in a PST File
API Reference: MailMessage Class, MapiMessage Class