0

enter image description hereI am creating outlook addin using visual studio 2015.

I have config two email address in outlook 2016.now when I click on specific inbox I want email address of the user who belongs to the inbox.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
baj9032
  • 2,414
  • 3
  • 22
  • 40
  • Just an aside, which email address? A user can have more than one assigned to them, even for a single specific inbox. – Rob Aug 22 '17 at 08:46
  • @Rob: Please see above image.when i click on tsstest111@gmail.com's inbox i want tsstest111@gmail.com same thing for the second account. – baj9032 Aug 22 '17 at 08:57
  • then use the name of the folder.. if you can guarantee the folder structure is like that for all – BugFinder Aug 22 '17 at 09:12

1 Answers1

0

So are you trying to figure out the owner of a particular store? Keep in mind that some stores (e.g. PST) do not have an intrinsic user associated with them - it could be a standalone PST or a PST with multiple POP3/SMTP accounts delivering to that store.

You can loop through the Application.Session.Accounts collection and check the Account.DeliveryStore property (compare the store entry ids using Namespace.CompareEntryIDs).

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78