How to work with 2 Exchange Servers?

  • Thread starter Thread starter Bingo
  • Start date Start date
B

Bingo

I've to work with two Exhange servers, Ex1 and Ex2.

All the users are on Ex1 and there's only one account,
Acct on Ex2. My VB App needs to open emails in Acct on
Ex2 from client PCs. I cannot find any parameters that I
can use to log onto Ex2 server instead of the default
Ex1. Any recommendations? Thanks
 
What do you mean by "log onto Ex2 server instead of the default Ex1"?
Do you mean log on using Namespace.Logon? Or using your custom dynamic
profile? Or when using Namespace.GetSharedDefaultFolder?
In most cases you don't need to do anything special, all calls are
transparently redirected to the appropriate server by the Exchange provider.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
OK, on Exchagne Server, Ex2 I've only one email account,
Acct. But all my users are on Exhcnage Server, Ex1.
Acct on Ex2 gives the view permission to all the users.

In my VB app, which will be running on each user's
desktop, needs to get the shared Inbox of Acct on Ex2 and
open emails in Acct on user's desktop.

When I are testing my code, as long as the local Outlook
is open or open from the profile popup, I cannot re-
direct to an account on a different exchange server. I
can only access those accounts on the same exchange
server. Hope this helps. Thanks.
 
' The VB app running on each user's desktop has the
' following code to log onto Exchange/Outlook
' If Outlook is running, a profile selection window
' pops up. Otherwise, the user needs to choose which
' profile to use
' All users are on Exchange Server Ex1
' bingo is not a valid account on Ex1

Set m_oApp = New Outlook.Application
Set m_oNsp = m_oApp.GetNamespace("MAPI")
m_oNsp.Logon "", "", True, True

' On Exchange Server Ex2, I only have one account, bingo
' Since both servers are sharing the same DC/AD
' (domain controller, active directory), I gave the
' permission to read bingo account to all users
' I then use the following code trying to connect to
' the shared Inbox of bingo's.
' The code failed since there's no bingo account on Ex1.

Set oMapiRecipient = oNsp.CreateRecipient("bingo")
Set oMapiInbox = oNsp.GetSharedDefaultFolder
(oMapiRecipient, 6) ' 6 olFolderInbox
 
Hmmm... You should be redirected automatically as long as both mailboxes are
in the same domain. Can you open the mailbox through the Outlook UI
(File|Open)?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
My bad. Just confirmed with our SA and the two Exchange
Servers are under different domains. Any way to get this
to work? Thanks.
 
Nope. One domain at a time. Even CDO or Extended MAPI won't help as the
Exchange provider caches some logon info for all processes on a given
machine and connecting to two or more servers from different domains
simultaneously confuses it.

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