Hello all,
I have a service that's using CDO 1.21 and Redemption to routinely
iterate through a list of users to retrieve some properties which are
then written to a database.
My problem is that the ExchangeServer property of my service is
user-configured and I wanted to have it write to the event log if this
value is invalid so that it stops trying to process the users
(sometimes in the thousands). Currently, my service is not able to
determine the difference between an invalid user (or a user that
doesn't have a mailbox) and an invalid Exchange Server. I'd like to be
able to Catch both.
The following is my Logon line of code, which generates no error:
_Session.Logon(Nothing, Nothing, False, False, Nothing, True,
ExchangeServer & vbLf & LegacyExchangeDN)
The line of code immediately following it does generate an error:
(MAPI_LOGON_FAILED) -2147221231
_Inbox = _Session.Inbox
I was curious if anyone has a suggestion to determine if the
ExchangeServer value provided is valid short of using DirectoryServices
& CDOEXM to connect to it and retrieve properties.