$mbox = imap_open ("{your.imap.host:143}", "username", "password"); echo "p h1 Mailboxes / h1 \n"; $folders = imap_listmailbox ($mbox, "{your.imap.host:143}", "*"); if ($folders == false) {echo "Call failed br \n";} else {while (list ($key, $val) = each ($folders)) {echo $val." br \n";}} echo "p h1 Headers in INBOX / h1 \n"; $headers = imap_headers ($mbox); if ($headers == false) {echo "Call failed br \n";} else {while (list ($key,$val) = each ($headers)) {echo $val." br \n";}} imap_close($mbox);
?php $mbox = imap_open ("{votre.hote.imap:143}", "nom_utilisateur", "mot de passe"); echo "p h1 Mailboxes / h1 \n"; $folders = imap_listmailbox ($mbox, "{votre.hote.imap:143}", "*"); if ($folders == FALSE) {echo "Appel échoué br \n";} else {while (list ($key, $val) = each ($folders)) {echo $val." br \n";}} echo "p h1 en-têtes dans INBOX / h1 \n"; $headers = imap_headers ($mbox); if ($headers == FALSE) {echo "Appel échoué br \n";} else {while (list ($key,$val) = each ($headers)) {echo $val." br \n";}} imap_close($mbox);?