Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Additional Mailbox owners

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Additional Mailbox owners
bevan.johnson[ at ]rawlinson-hunter.com 02.06.2006 13:31:14
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.

Re: Additional Mailbox owners
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 02.06.2006 17:31:17
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

<bevan.johnson[ at ]rawlinson-hunter.com> wrote in message
news:1149255074.380009.250990[ at ]c74g2000cwc.googlegroups.com...
[Quoted Text]
> 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.
>


Re: Additional Mailbox owners
bevan.johnson[ at ]rawlinson-hunter.com 05.06.2006 13:56:07
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.

[Quoted Text]
>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.

Dmitry Streblechenko wrote:
> 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
>
> <bevan.johnson[ at ]rawlinson-hunter.com> wrote in message
> news:1149255074.380009.250990[ at ]c74g2000cwc.googlegroups.com...
> > 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.
> >

Re: Additional Mailbox owners
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 05.06.2006 17:32:01
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

<bevan.johnson[ at ]rawlinson-hunter.com> wrote in message
news:1149515767.279059.131740[ at ]j55g2000cwa.googlegroups.com...
[Quoted Text]
> 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.
>
> Dmitry Streblechenko wrote:
>> 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
>>
>> <bevan.johnson[ at ]rawlinson-hunter.com> wrote in message
>> news:1149255074.380009.250990[ at ]c74g2000cwc.googlegroups.com...
>> > 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.
>> >
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net