Is there any easy/elegant way to verify, that a SMTP address is associated with an Exchange mailbox via EWS?
Credentials of an administrative Exchange user are given.
The following quick and dirty solution works:
Create an ExchangeService with the SMTP address as Impersonated user
Try to make a method call
When the exception message is "The SMTP address has no mailbox associated with it.", the SMTP address is not associated with a mailbox
Problem:
Not that elegant to compare the exception message
Takes about 200-250ms per user (not parallel)
Another Problem:
It is possible, that there are contacts in the GAL, that don't have a mailbox.
So ResolveNames won't be helpful.