Retrieve a SafeRecipient from an EntryID

  • Thread starter Thread starter Ryan Hubbard
  • Start date Start date
R

Ryan Hubbard

I can't seem to figure out how to get a SafeRecipient item from an
entryid using redemption without the security prompt popping up. I
know there must be a way to do it. Can someone please help me out.
Thansk
 
Actually entry id maps to an AddressEntry object that lives in one of the
address book containers, not to a recipient.
Recipient is an object local to a message, it never exists by itself. I have
no idea why MS decided that some OOM methods must take a Recipient object
rather than AddressEntry.
To get an AddressEntry object, use MAPIUtils.GetAddressEntryFromID.
To get a Recipient object (what will you be using it for?), use
MAPIUtils.CreateRecipient.

What exactly are you trying to achieve?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thanks Dimtry for the quick reply. I appreciate it. What your saying
make so much more sence now. What I am doing is collecting a list of
SafeRecipients stored in a Redemption.SafeRecipients object from the
AddressBook function in your Redemption. I then want to store the list
of entry ID's in a text file. Later I would like to recreate the
SafeRecipient's in a SafeRecipients object using the entryID's stored in
the text file.

So I guess a better way of looking at this would be to convert the
SafeRecipients objects into a collection of AddressEntry objects, that
way I can easily recreate the collection of AddressEntry objects from
the entryID's I'll pull in from the text file. If there's a better way
please let me know.

Thanks again.
 
Hmmm... For AddressBook to take the Recipients collection makes perfect
sense (since the Recipient object can be unresolved, its has the Type
property (to, cc, bcc), etc).
To recreate a recipients collection you need to create a temporary message
and add the recipients to it. For that you would need to have both the name
and address for each recipient.

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