0

I have came across the situation where I want to find in which folder on "Contacts" the received email belongs. e.g. Currently I have "My Contacts" folder in my Outlook. This folder contains many distribution list in terms of folder. (I did this by right click on "Contacts" option in Outlook and selected "Create new folder". Then I created 1000s of records in it by importing CSV files provided) I've created around 10-15 such folders in "Contacts". These all folders contains 1000s of records (Contacts)

Now the main situation.

I have done email campaigning. As a result I've got responses as a failure message and some other replies as well.

I don't want to do it manually by copying the email and then find it whether it exist in the Contacts list I've created. This will be too time consuming for me.

I came to know that using Microsoft Outlook API in C# (Read Outlook Email), you can read the mail item. I want to browse all the mail items that I've received and find it to which contact folder it belongs. Here is a link of how to create/browse the contacts in Outlook. Read/Write contacts outlook)

Now I need clue/solution if anybody had done such thing earlier as from where should I start. I am really confuse about this.

Community
  • 1
  • 1
YuDroid
  • 1,599
  • 5
  • 22
  • 44
  • So what exactly are you having problems with? Retrieving the email address from a bounced email? Recursively looping through the contact folders? Or checking that a contact with particular email address exists in a given folder? – Dmitry Streblechenko Aug 08 '15 at 17:28
  • Yes. The last one. To check that a contact with particular email address exists in a given folder.. – YuDroid Aug 10 '15 at 07:01
  • MAPIFolder.Items.Find("[Email1Address] = '" + strEmail + "' OR [Email2Address] = '" + strEmail +"' OR [Email3Address] = '" +strEmail +"'") – Dmitry Streblechenko Aug 10 '15 at 13:57

0 Answers0