|
 |
asp_cdo thread: Re: CreateObject(
Message #1 by "lionel" <lionel@o...> on Wed, 2 May 2001 16:24:58
|
|
Hi.
My exchange is running on a different machine.
I don't know why the code working in VB but not in ASP
Basic Authentication is used in exchange server machine.
Can somebody help?
Code:
Dim objInbox
Dim colMsgs
Dim strMachineName
Dim strMailbox
Dim objCurSession
' Assign the values from the query string into local variables
' since they will be needed more than once.
strMachineName = "ServerName"
strMailbox = "Lionel"
' Use the values passed in to create a new session and
' initialize its variables.
Set objCurSession = CreateObject("MAPI.Session")
objCurSession.Logon "", "", False, True, 0, True, strMachineName _
& vbLf & strMailbox
' Get the user's name from the session, and store it for later use.
MsgBox objCurSession.CurrentUser.Name
Message #2 by "Earls, Michael (CORP)" <Michael.Earls@C...> on Wed, 2 May 2001 12:23:01 -0400
|
|
Based on your code, you shouldn't use the MsgBox in ASP.
Michael Earls
-----Original Message-----
From: lionel [mailto:lionel@o...]
Sent: Wednesday, May 02, 2001 9:25 AM
To: ASP CDO
Subject: [asp_cdo] Re: CreateObject(
Hi.
My exchange is running on a different machine.
I don't know why the code working in VB but not in ASP
Basic Authentication is used in exchange server machine.
Can somebody help?
Code:
Dim objInbox
Dim colMsgs
Dim strMachineName
Dim strMailbox
Dim objCurSession
' Assign the values from the query string into local variables
' since they will be needed more than once.
strMachineName = "ServerName"
strMailbox = "Lionel"
' Use the values passed in to create a new session and
' initialize its variables.
Set objCurSession = CreateObject("MAPI.Session")
objCurSession.Logon "", "", False, True, 0, True, strMachineName _
& vbLf & strMailbox
' Get the user's name from the session, and store it for later use.
MsgBox objCurSession.CurrentUser.Name
|
|
 |