title: php IMAP connect to hotmail
body: <p>I am using imap_open to connect to my hotmail account. Now I want to check list of all folders like inbox, junk, sent etc. using imap_list() like this.</p>
  
  <pre><code>&lt;?php
     $mbox = imap_open("{pop3.live.com:995/pop3/ssl}", "username", "password")
       or die("can't connect: " . imap_last_error());
  
      $boxes = imap_list($mbox, '{pop3.live.com:995/pop3/ssl}', '*');
  
      print_r($boxes);
      imap_close($mbox);
   ?&gt;
  </code></pre>
  
  <p>but it shows only Inbox. Actually I want to check mails in the junk folder.</p>