Error when connecting to Exchange on other domain

0

After connecting to Exchange on a different domain using:

rdoSession = RedemptionLoader.new_RDOSession();
rdoSession.LogonHostedExchangeMailbox(Settings.Default.ExchangeServer, Settings.Default.ExchangeUserName, Settings.Default.ExchangePassword);

I want to get the default inbox folder:

RDOFolder folder = rdoSession.GetDefaultFolder(rdoDefaultFolders.olFolderInbox);

But I get this error:

System.Runtime.InteropServices.COMException (0x80040111): Error in IMAPISession::OpenMsgStore: MAPI_E_LOGON_FAILED
Make sure your code runs under the Windows user identity that has MAPI profiles.
When running in a service (including ASP under IIS), set your code to run under the Windows user account that has MAPI profiles.
When connecting to an Exchange Server, you can also use RDOSession.LogonExchangeMailbox which does not require an existing profile.
ulVersion: 0
Error: The information store could not be opened.
Component: MAPI 1.0
ulLowLevelError: 0
ulContext: 646

How can i read mails from exchange on different domain? Thanks!

c#
exchange-server
outlook-redemption
asked on Stack Overflow Feb 16, 2015 by Sarah • edited Feb 16, 2015 by dub stylee

1 Answer

0

Sarah,

Consider using EWS instead. You can use Exchange Web Services (EWS) and other web services in Exchange Online, Exchange Online as part of Office 365, or Exchange on-premises to create solutions that enable your users to access Exchange mailbox data from services, websites, desktop computers, and mobile devices. See EWS Managed API, EWS, and web services in Exchange for more information.

answered on Stack Overflow Feb 17, 2015 by Eugene Astafiev

User contributions licensed under CC BY-SA 3.0