Accessing Outlook via COM object

From: Date: Tue, 23 Sep 2003 12:31:38 +0000
Subject: Accessing Outlook via COM object
Groups: php.windows 
Request: Send a blank email to php-windows+get-21527@lists.php.net to get a copy of this message
I'm pulling my hair out trying to simply create a MAPI session by instantiating the Outlook.Application COM object. We have followed instructions on setting up the server so that appears to be set up okay with the appropriate permissions but everytime I run this simple 3 line script I get the following message: <-- SCRIPT --> $oOutlook = new COM("Outlook.Application"); $session= new COM("MAPI.Session"); $vbLF = "Chr(10)"; $strExchangeServer = "exchange"; $strMailbox = "testmail"; echo $session->Logon("'','',False,True,,True," . $strExchangeServer . $vbLF . $strMailbox); This was extracted from VB code that does the same thing...here is that code: strExchangeServer = "exchange" strMailbox = "testmail" vbLF = Chr(10) Set objSession = Server.CreateObject("MAPI.Session") objSession.Logon "", "", False, True,,True, strExchangeServer & vbLF _ & strMailbox The Error: The Outlook Application instantiation works and returns an object as expected. The MAPI session instantiates and returns an object as expected. The logon fails and returns this error: Warning: Invoke() failed: Exception occurred. Source: Collaboration Data Objects Description: [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]] in hs~MAPI001.php on line 8 Am I passing the wrong values? Am I converting the code to PHP correctly? What else can I try? I know this should work but the logon method is quite complex. Thanks, Ron

« previous php.windows (#21527) next »