PHP script to test IMAP

Here is a PHP Script to login to IMAP server.

Mailboxes\n";

$folders = imap_listmailbox($mbox, "{imap.example.org:143}", "*");

if ($folders == false) {
    echo "Call failed
\n"; } else { foreach ($folders as $val) { echo $val . "
\n"; } } echo "

Headers in INBOX

\n"; $headers = imap_headers($mbox); if ($headers == false) { echo "Call failed
\n"; } else { foreach ($headers as $val) { echo $val . "
\n"; } } imap_close($mbox);

See PHP

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *