getting SMTP address from Contact using redemption

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
 
D

Dmitry Streblechenko

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
 
H

Hendrik Schreiber

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
 
H

Hendrik Schreiber

....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
 
D

Dmitry Streblechenko

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
 
H

Hendrik Schreiber

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
 
D

Dmitry Streblechenko

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
H

Hendrik Schreiber

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
 
H

Hendrik Schreiber

Thanks for fixing this, Dmitry. It would have been a showstopper for us.

-hendrik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top