PST issue with FolderInfoCollection and MessageInfoCollection

Last post 02-14-2012, 12:08 PM by TRICE. 12 replies.
Sort Posts: Previous Next
  •  02-05-2012, 11:48 AM 359332

    PST issue with FolderInfoCollection and MessageInfoCollection

    Attachment: Present (inaccessible)

    Sorry I failed to include the PST in my last Post. Here is everything again including the PST.

    Below is a copy of my other post comments.Hopefully pst named   Aspose Test PST.pst   zipped and is ok.

     

     I loaded Net 1.4.0

    Issues

    1. In The Folder list FolderInfoCollection - folderInfo.ContentCount always = 0. Should be number of messages in the folder.
    2. In The Folder list MessageInfoCollection - messageInfo.Subject returns spaces.

    More serious Issues

    If I load the PST with several messages then extract them I am getting the wrong messages. The attached PST has 1 Inbox message,
    1 Drafts message and 1 deleted items message. I used WebDAV messages named "WebDAV Import" to load the PST. I named messages
    extracted from the PST with Aspose software "Aspose Export". I also extracted messages from the PST using a different software tool
    and they are named "Another Export".


    WebDAV Import Inbox Message 1.msg Matches
    Another Export Inbox 1.msg Matches
    Aspose Export Inbox 1.msg Completely Different

    WebDAV Import Drafts Message 1.msg Matches
    Another Export Drafts 1.msg Matches
    Aspose Export Drafts 1.msg Completely Different (Looks like same message as Aspose Export Inbox 1.msg)

    WebDAV Import Deleted Items Message 1.msg Matches
    Another Export Deleted Items 1.msg Matches
    Aspose Export Deleted Items 1.msg Completely Different

    The attached .zip contains all the .msg files, the PST and code snippets for how I created the PST,
    How I loaded it with messages, How I did the Folder Collection and how I exported the messages.

    I think the PST is fine, but the code I am using to examine the PST contents is generating bad results.


    vV

     
  •  02-06-2012, 3:36 AM 359407 in reply to 359332

    Re: PST issue with FolderInfoCollection and MessageInfoCollection .NET

    Attachment: Present (inaccessible)
    Hi Tom,

    Thank you for providing the sample PST.

    I am unable to open any of the WebDav messages in Outlook 2010, instead I have to use some third party tool to examine the message contents. So, I believe that the problem is with the sample message files that you are adding to the PST, not with your source code. Moreover, I have noticed that after adding to PST, the fields such as To, From and Subject are replaced with empty strings but when extracted from the PST, these messages have Japanese characters as the Subject field [please check attachment]. 

    Two tickets have been logged into our tracking system. The details are as below,
    1. NETWORKNET-33145: To investigate the problem of FolderInfo.ContentCount.  I can confirm that the ContentCount for every folder is zero.
    2. NETWORKNET-33146: To investigate the problem of empty message string as Subject of the message in PST file and  Japanese characters  in Subject when extracted.
    I also believe that the message miss-match issue as discussed in your original post is related to the ticket NETWORKNET-33146.

    We will keep you posted with updates on these issues.

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  02-06-2012, 8:20 AM 359482 in reply to 359407

    Re: PST issue with FolderInfoCollection and MessageInfoCollection

    I will retest using some Net 2010 messages. Please understand that when I use a different PST Library from Independentsoft.de to Import the PST it works perfect. Subject, message, everything looks exactly as the WebDAV message. I have no clue where the Funny characters are coming from. The  Independentsoft.de PST software can read the PST ok but the Aspose software does not. Also, I am unable to read the WebDAV .msg files using outlook. I can read them as .eml files using Mozilla Thunderbird and they look fine using that software. The Independentsoft.de PST Library will not create a PST, but will read an existing one. We would like to be able to create as well as read it back. That is why your software is of interest to us.
     
  •  02-07-2012, 8:01 AM 359771 in reply to 359482

    Re: PST issue with FolderInfoCollection and MessageInfoCollection .NET

    Hi Tom,

    Thank you for your interest in Aspose products.

    I hope the issues that you are facing right now will soon be sorted out. I am in contact with the development team on these issues and I will keep you posted with updates. 

    [Edited] We are not able to open WebDav messages in Outlook cause they are of EML format with wrong extension. If you change the extension to .eml then these messages can be viewed using MS Outlook.

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  02-07-2012, 8:23 AM 359775 in reply to 359771

    Re: PST issue with FolderInfoCollection and MessageInfoCollection

    Having never used your products I struggle to find specific code examples for PST usage. Can you point me to where these are at? So far I have been using other forum PST questions to try and find code examples. Thanks
     
  •  02-08-2012, 10:04 AM 360113 in reply to 359785

    Re: PST issue with FolderInfoCollection and MessageInfoCollection

    Do you have a code sample to get the full path and folder names in the path? I found a reference to  FolderInfo.RetrieveFullPath()  but I do not know how to code the full example. Thanks for the other code examples.   
     
  •  02-08-2012, 11:25 AM 360136 in reply to 360113

    Re: PST issue with FolderInfoCollection and MessageInfoCollection .NET

    Hi Tom,

    Please find below the sample source for your need,
    C#
      using (var pst = Aspose.Email.Outlook.Pst.PersonalStorage.FromFile("E:\\items.pst"))       {             var root = pst.RootFolder;             Console.WriteLine(root.RetrieveFullPath());             foreach (var folder in root.GetSubFolders())             {                   Console.WriteLine(folder.RetrieveFullPath());                   if (folder.HasSubFolders)                   {                         foreach (var subfolder in folder.GetSubFolders())                         {                               Console.WriteLine(subfolder.RetrieveFullPath());                         }                   }             }       }


    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  02-09-2012, 2:23 PM 360507 in reply to 359785

    Re: PST issue with FolderInfoCollection and MessageInfoCollection

    I have continued to test message import/export and here is what I find. You may have reported this condition, but this is what I have tested.

     

    1. Within Outlook I created a PST and Folder Inbox and placed some messages in the Inbox.

    2. Aspose software will correctly export them to .msg files and they can be read by outlook by

        clicking on them.

    3. If I take one of these messages and load it back into the PST Inbox it displays incorrectly,

         no subject and the message body is just alpha/numeric data. The same happens if I load

         a WebDAV or Exchange NET 2010 message. Valid messages export to DASD just fine,       but  I   can not get anything to load from DASD back into the PST and work.

    You should be able to replicate this by taking any PST and loading some messages and see what you get.

     

    Let me know when a fix is available, or if you can not replicate this issue, or if you need any of my test data.

     

    Filed under: clicking on them
     
  •  02-11-2012, 4:27 AM 360862 in reply to 360507

    Re: PST issue with FolderInfoCollection and MessageInfoCollection .NET

    Attachment: Present (inaccessible)
    Hi Tom,

    Thank you for your patience and consideration. 

    We have been able to sort out the problem logged earlier under ticket Id NETWORKNET-33146. As discussed here, the messages shared by you having the prefix "WebDav" are actually of EML format and have Unicode characters. This fact changes the logic for loading these messages into a PST file. You need to explicitly specify the Unicode format while adding them to some PST folder. Please check the below source code and attached PST file for your reference. 

    C#
          //Create a new PST       using(var pst = Aspose.Email.Outlook.Pst.PersonalStorage.Create("test5.pst", FileFormatVersion.Unicode))       {             //Get Root of PST             FolderInfo root = pst.RootFolder;             //Add a folder at Root of PST by name of Inbox             root.AddSubFolder("Inbox");             //Get Inbox folder             FolderInfo inbox = root.GetSubFolder("Inbox");
                //Load the WebDav message into an instance of MailMessage             MailMessage mailmessage = MailMessage.Load("WebDAV Import Inbox Message 1.eml");             //Add MailMessage into an instance of MapiMessage and add MapiMessage to Inbox folder of PST             inbox.AddMessage(MapiMessage.FromMailMessage(mailmessage, OutlookMessageFormat.Unicode));             mailmessage = MailMessage.Load("WebDAV Import Inbox Message 1.msg");             inbox.AddMessage(MapiMessage.FromMailMessage(mailmessage, OutlookMessageFormat.Unicode));       }

    Please give it a try at your end and feed us back. 

    Thanks and Regards,

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  02-14-2012, 9:18 AM 361512 in reply to 360862

    Re: PST issue with FolderInfoCollection and MessageInfoCollection

    So far the Unicode translation is working fine with both WebDAV and Exchange messages.

    One question for now is can I process the message as a text string without sending it to DASD first?  MailMessage.Load seems to always want to retrieve the message from DASD.

    Thanks

     
  •  02-14-2012, 11:37 AM 361558 in reply to 361512

    Re: PST issue with FolderInfoCollection and MessageInfoCollection .NET

    Hi Tom, 

    Thank you for your feedback. 

    I am afraid, I have never encountered such scenario where I have to load a message from a string. Also, I believe there are no means available to fulfil your requirement by using the current implementation of Aspose.Email component. 

    I will dig into it to find an appropriate solution for your need. 

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
  •  02-14-2012, 12:08 PM 361575 in reply to 361558

    Re: PST issue with FolderInfoCollection and MessageInfoCollection

    Not a problem for me as is. Thanks
     
View as RSS news feed in XML