title: PHP Class COM for Outlook not open outlook
body: <p>I have used below code for open outlook by PHP COM method. But outlook not open and it is loading &amp; loading. no response, not open outlook, only loading &amp; loading. Please give solution how to open outlook by PHP COM method. I have installed Office Outlook &amp; also have MAPI.Session &amp; also have Outlook.Application. </p>
  
  <pre><code>if (! defined ( "olMailItem" ))
  {
  define ("olMailItem", 0 );
  }
  try {
  $objApp = new COM ( "Outlook.Application" ) or die ( "Cannot Load Outlook.Application" );
  $namespace = $objApp-&gt;GetNamespace("MAPI"); 
  $namespace-&gt;Logon();
  $myItem = $objApp-&gt;CreateItem ( olMailItem );
  $myItem-&gt;To = "yusuf.khalil88@gmail.com";
  $myItem-&gt;SentOnBehalfOfName = "yusuf_khalil88@yahoo.com";
  $myItem-&gt;Subject = "Hi Response me";
  $myItem-&gt;Body = "I want to find out";
  $myItem-&gt;Send ();
  }catch ( Exception $e ) {
  var_dump ( $e-&gt;getMessage () );
  debug_print_backtrace ();
  }
  </code></pre>