Synchronizing recipients

K

keijo47

Hi,

I need to synchronize Outlook recipients between Redemption's
SafeMailItem's SafeRecipients (normal recipients and distribution
lists) and a custom data structure (fields: Name, PhoneNumber,
IsResolved). It's easy from SafeRecipients to the custom data structure
but I've had some resolving problems when doing it the other way: the
resolved recipients in the custom data structure are the ones that the
user has already resolved -- manually, if necessary. So now if I build
a SafeRecipients collection from the recipients in the custom data
structure, I need to make the Outlook know who they are without having
to make the user resolve them again.

So the question is: how can I add recipients to a SafeRecipients
collection so that Outlook always knows who they are? Could I use
AddEx() here? If so, then does it work in all cases? What data do I
need to store in the custom data structure if I decide to do so and
where can I get that data? Could I possibly use EntryId property of a
Recipient somehow (doesn't it give a unique identifier for one
Recipient entry)?

I can change the custom data structure to hold any information needed,
though it would be nice if I could keep the data structure somewhat
Outlook-independent (otherwise, I could've used Outlook's/Redemption's
collections in the first place).

BR,

Keijo
 
K

Ken Slovak

Dmitry can correct me if I'm wrong but I believe that using AddEx will
create what's called a one-off recipient. If the recipients are added and
then resolved in code that should work. SafeRecipient has a Resolve method.
 
R

raveli

Hi Ken and thanks for your reply.

Now, if I've understood correctly, using AddEx doesn't really help me
much for example if I'm having two distribution lists called "group"
and "recip group". If I manage to add the "group" distribution list to
the SafeRecipients collection, I still won't be able to simply resolve
the list to the "group". Instead, the user has to manually explain
Outlook that he really means "group" and not "recip group".

And this gets even more complex if I have two distribution lists in my
address books with completely same names. Is there a way to
programmically resolve the recipients in a "manual way" i.e. by
checking that the Recipient.Resolve method returned false and then
search for all matching contacts in all accessible addressbooks and
then choose the correct Recipient by comparing the lists members and
possibly other properties?

- keijo
 
R

raveli

Hi Ken and thanks for your reply.

Now, if I've understood correctly, using AddEx doesn't really help me
much for example if I'm having two distribution lists called "group"
and "recip group". If I manage to add the "group" distribution list to
the SafeRecipients collection, I still won't be able to simply resolve
the list to the "group". Instead, the user has to manually explain
Outlook that he really means "group" and not "recip group".

And this gets even more complex if I have two distribution lists with
completely same names in my address books. Is there a way to
programmically resolve the recipients in a "manual way" e.g. by
checking that the Recipient.Resolve method returned false and then
search for all matching contacts in all accessible addressbooks and
then choose the correct Recipient by comparing the lists members and
possibly other properties?

- keijo
 
K

Ken Slovak

AddEx has nothing to do with distribution lists. It adds a one-off recipient
to a Recipients collection. One-offed in this case means the resolution
information is contained in the recipient and it is not resolved by going to
an Outlook address book.

To work with DL's you must use a distribution list item, either in Outlook
or Redemption.

If you use the .Resolve method you can check for .Resolved.

Also, you are not including parts of the thread in your posts when replying
to a thread, which makes it very hard to follow. Please do so.
 

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