Additional Mailbox owners

  • Thread starter Thread starter bevan.johnson
  • Start date Start date
B

bevan.johnson

Hi,

I have written an Outlook Add-In that files emails by recording the
email details to an SQL db and then saving the email as an msg file on
a NTFS structure. We have users who monitor other users mailboxes by
added them via the accounts section -> additional mailboxes. My problem
occurs when I have to differentiate between the user who is filing and
the user they are filing for.

Obviously getting the username of the logged in user is not a problem,
but getting a unique key on the mailbox they are accessing is.
Currently I am looking at the currentFoler.folderpath and extracting
the name from there. This obviously isn't ideal as two people can have
the same name. The storeid and entryid of any folder I believe to be
unique, but is there any link between these two keys and any properties
of the mailbox owner in AD?

Thanks for your help.

Bev.
 
In Extended MAPI you can try to read the PR_MAILBOX_OWNER_ENTRYID property
from the store (IMsgStore). If that does not work (e.g. the store is
cached), you can retrieve the PR_PROFILE_MAILBOX property from the store's
profile section and create a GAL entry id given that address (see _entryid.h
in the SDK).

<plug> RDOExchnageStore object exposes the Owner property (returns
RDOAddressEntry object) - see
http://www.dimastr.com/redemption/rdo/rdostore.htm#RDOExchangeMailboxStore
</plug>

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Dmitry,

Nice Plug :) I have used the RDOExchangeStore.Owner property by passing
the current folder storeID to the GetStoreID method and then explicitly
casting that as a RDOExchangeStore.
From this I could use Owner.Address or Owner.SMTPAddress to locate my
user in the AD.
If I was to use the Address property, the keyname for that in AD is
"legacyexchangedn". This leads me to believe it may not be around much
longer as the word "legacy" indicates compatibilty with past versions.
What is your view on this?

Expect $200 to be credited to your account in the near future!!
Redemption rocks!

Thanks again

Bev.
 
That "legacy" format will outlive us all :-)
It is the Exchange native address type (PR_ADDRTYPE = "EX").

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top