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

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to