getting SMTP address from Contact using redemption

  • Thread starter Thread starter Hendrik Schreiber
  • Start date Start date
H

Hendrik Schreiber

Hi,

I am trying to get the SMTP address from a ContactItem(!) using Redemption.

Originally I used both OOM and CDO for this - I simply got the
EmailAddressEntryID from the OOM ContactItem and then looked up the
AddressEntry using GetAddressEntry on a CDO MAPISession. Then I read the
CdoPR_EMAIL field (0x39FE001E). Worked like a charm, but I got those nasty
messages...
How do I do the same thing with Redemption? In OOM there does not seem to be
an equivalent of GetAddressEntry...

Thanks, your help is appreciated,

-hendrik
 
Create an instance of Redemption.MAPIUtils object and call
MAPIUtils.GetAddressEntryFromID().

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

I couldn't find that function in the documentation on your website - that's
why I asked. Is there more doucmentation available somewhere...?

Anyhow - many, many thanks for the quick answer (12min - that's pretty
amazing!). You saved my day :-)

Hope my company buys a license soon...

-hendrik
 
....just one thing: it seems that the AddressEntry IDs I get for the
different ContactItem email addresses (Email1EntryID, Email2EntryID,
Email3EntryID) are all the same. Am I doing something wrong or is this a bug
in redemption?

Thanks,

-hendrik
 
Hmmm... Did you compare them to the ones returned by OOM?
Actually, it can happen: if a contact is a GAL entry, even though there are
3 different proxy SMTP addresses, they all resolve to the same GAL entry id.

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

this is what I did:

- created a new contact
- edited field email to be an email address of type EX
- edited field email1 to be a different email address of type EX
- looked at the addressEntryIds for all three possible email entries

In OOM the entryIds are garbage anyway (see earlier posting of mine), but at
least they are different for different addresses. If I look up the
contactItem in CDO, I can get the different entryIds for email and email1 -
and they make sense, i.e. I can use them for a lookup.
Now in redemption the contactItem's emailEntryIds is usable and the lookup
works. But for all three emails I get the id of the first entry. Even, for
the email entry that isn't set at all (email2)!

To me this looks like a cut and paste programming error in redemption.
However, I will double-check my code again.

Thanks,

-hendrik
 
Send me an e-mail to my private address, and I'll send you the latest build
just to make sure we are on the same page.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
PMFJI, but I've seen the same thing when using early binding on
Redemption objects if Redemption wasn't installed as a
self-registering library. In those cases only late binding worked.
 
Ken - Any help is welcome!

But unfortunately I am using late binding as I am actually talking to
redemption using a Java/COM bridge (Jacob).

-hendrik
 
Back
Top