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

  • Thread starter Tim s
  • Start date Views 1,846
Status
Not open for further replies.
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

("joe@exchangeserver.com");

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

}
 
D

Dmitry Streblechenko

Re: How to determine if email address resides in Exchange w/o Outlook Security prompts?

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)

-

"Tim s" <tsmojver@gmail.com> wrote in message

news:bb39d2f6-cda7-4c4e-b582-ea9b6d559610@q14g2000vbn.googlegroups.com...
> 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
> ("joe@exchangeserver.com");
> 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
> }

>
 
Status
Not open for further replies.
Top