I have a Delphi 2006 BDS application with the following code to iterate outlook mailboxes and then the Inbox and Sent Items within the mailbox:
try
nameSpa
In Outlook folders can be typed and have a DefaultItemType property. Replacing
if Pos('MAILBOX', UpperCase(mailbox.Item[i].Name)) > 0 then
with
if (mailbox.Item[i].DefaultItemType = olMailItem) then
should give you the folders that by default store only mail messages.
Mail messages can of course be stored in untyped folders as well, but as olMailItem has
olMailItem = $00000000;
as its value, it is the default for all untyped folders as well. So basically any untyped folder by default stores mail items.