0
votes

I try to list exchange mailbox folders and have one problem.

When I logon to exchange server via web interface I can see lot of calendars shared for me by other collegues. Also I can see these calendars in my Outlook.

Using the code from below I can see all my objects (owned by my account) but not these shared calendars.

Have you any solution to get access to this calendars? They are shared for me, I can create appointments inside of them from my Outlook.

Session := CreateOleObject('Redemption.RDOSession') as IRDOSession;
Session.LogonExchangeMailbox(edit1.Text, edit2.Text);

Memo1.Lines.Add(Session.Stores.FindExchangePublicFoldersStore.Name);
for i := 1 to Session.Stores.count do
begin
  Store := Session.Stores.Item(i, True);
  Memo1.Lines.Add('=> ' + Store.Name + ' : ' + IntToStr(Store.StoreKind));
  if Store.StoreKind <> 0 then
  begin
    for j := 1 to Store.IPMRootFolder.Folders.Count do
    begin
      Folder := Store.IPMRootFolder.Folders.Item(j);
      Memo1.Lines.Add('==> ' + Folder.Name);
      for k := 1 to Folder.Folders.Count do
        Memo1.Lines.Add('==> ' + Folder.Folders[k].Name);
    end;
  end;
end;
1

1 Answers

1
votes

Shared folders are stored in the primary mailbox OST file outside of the IPM tree visible to the end user. Redemption does not explicitly expose shared folders, but you should be able to get to them through RDOStore.RootFolder. You can see them in OutlookSpy – click IMsgStore and drill down to the folder in question (root folder\Shared Data\etc.)