| Author |  | 
      
        | TrevorWAtson Newbie
 
  
  
 Joined: 10 February 2011
 Location: Canada
 Online Status: Offline
 Posts: 2
 | 
          I am currently attempting to create a project that extracts all emails and attachments from a PST to EML w/ the attachments in the directory with it.  However, when I use the PSTReader to get the items and change it to a MailMessage via GetAsMailMessage(), there is no reference to the attachments left behind.
           | Posted: 10 February 2011 at 2:08pm | IP Logged |   |  
           | 
 |  
 The code I use to loop through all items in a PST is
 
 
 
| Code: 
 
    
    | 
      
       | MailBee.Outlook.PstFolderCollection folderColl = pstReader.GetPstRootFolders(true);
 foreach (MailBee.Outlook.PstFolder folder in folderColl)
 {
 foreach (MailBee.Outlook.PstItem item in folder.Items)
 ....
 
 |  |  |  
 
 I then call
 
 
| Code: 
 
    
    | 
      
       | item.GetAsMailMessage().Attachments.Count |  |  |  on the item.   This always returns 0, no matter if the item should have attachments or not.
 
 Is this by design?  Can you not retrieve an email with attachments via the MailBee Outlook items?
 
 I have a PST available if you wish to see my testing PST.
 
 Thanks in advance.
 
 Trevor Watson
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | TrevorWAtson Newbie
 
  
  
 Joined: 10 February 2011
 Location: Canada
 Online Status: Offline
 Posts: 2
 | 
          I'm using v6.7.2.264 of the MailBee Objects.NET in a .NET 2.0 environment
           | Posted: 10 February 2011 at 2:10pm | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6167
 | 
          If it's possible, please provide us with test PST file via HelpDesk.
           | Posted: 11 February 2011 at 4:22am | IP Logged |   |  
           | 
 |  Please also point us to the email message(s) in question.
 
 One more thing: did you try to save those messages to disk as EML files? Are they saved OK, and maybe that's just a
 problem with Attachments.Count itself, while the attachments are fetched fine?
 
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  |