N1----FW----N2--EXCH
Outlook 2000, Exchange 2003, VB6
I am on network 1
Firewall between Network 1 and 2.
I have a local profile setup connecting to the mailbox I need access
to on N2 and it works.
The profile is named, has the N2 domain, N2 user and profile password.
Using:
MAPI.session.logon "<profilename>", "pwd"
I receive the profile prompt, I can login, I can use CDO to do
whatever I want with the mailbox.
Using:
MAPI.session.logon "<profilename>", "pwd", False ([ShowDialog]), True
([NewSession])
I receive "Information store could not be opened. Mapi 1.0
MAPI_E_FAILONEPROVIDER 8004011D"
The user prompt is the only thing that has worked at all, but I need
this to run as a scheduled task and without user intervention.
Code:
Dim oSession As MAPI.Session
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "<profileName>", "<pwd>" 'WORKS but prompts for profile
password
oSession.Logon "<profileName>", "<pwd>", False, True 'DOES NOT WORK
oSession.Logon "<profileName>", "<pwd>", False 'DOES NOT WORK
oSession.Logon "<profileName>", "<pwd>", False, True, 0, true 'DOES
NOT WORK
oSession.Logon "", "", False, True , 0, True, "<profileInfo>" 'DOES
NOT WORK
profileInfo strings I have tried:
"<ExchServerName>" & vbLf & "<domainUserName>"
"<ExchServerName>" & vbLf & "<domainName>\<domainUserName>"
"<domainName>\<ExchServerName>" & vbLf & "<domainName>
\<domainUserName>"
"<domainName>\<ExchServerName>" & vbLf & "<domainUserName>"
All of the above using the mail acct name
The only thing I can think of is the firewall is blocking some type of
communication that CDO/Outlook needs to login. If this is the case,
maybe it would work if I test this on the same network and domain as
the exchange server....?
Thanks for any insight or experience.
momentous@gmail.com - 02 Mar 2007 20:59 GMT
Apparently if I'm logged on as the mailbox owner on the domain the
profilestring method works fine without prompting for a password.
oSession.Logon "", "", False, True , 0, True, ServerName & vbLf &
MailBoxUserName