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);
Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement