How to determine if email address resides in Exchange w/o OutlookSecurity prompts?

  • Thread starter Thread starter Tim s
  • Start date Start date
T

Tim s

See below for underlying goals.

Goal: Retrieve shared default folder based on an email address, in
code running outside the outlook.exe address space, on
Outlook 2002, 2003, 2007, in managed code.

Tools: Outlook Remeption 4.7; Outlook Object Model

Cant use RDOSession.GetSharedDefaultFolder() due to COM Marshalling
Bugs acccording to RDO Documentation

//snippet
1 var recipient = NameSpace.CreateRecipient
("(e-mail address removed)");
2 var sharedCalendarFolder = NameSpace.GetSharedDefaultFolder
(recipient, OlDefaultFolders.olFolderCalendar);

//NOTE: Line 2 is SLOW when on Outlook 2007 and the user is not on
Exchange, and will get a COMexception

Challenge: Fill in method

Bool IsExchangeUser(Recipient recipient)
{
//NOTE: recipient.AddressEntry and AddressEntry.GetExchangeUser()
generates security prompts
//NOTE: MAPIUtils.CreateRecipient(..) throws COMException with
message "Catastrophic Failure" randomly
}
 
Look at the address type (Recipient.AddressEntry.Type) - EX vs SMTP.
If you are using Redemption (which exposes GetSaherdDefaultFolder), why do
you care about the security prompts in Outlook?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Back
Top