Topic: reading from POP3/IMAP
I was trying to read my mails from POP3/IMAP mail box, the script was able to open the mail box from my machine, but when I loaded it to website, it is not working
<?php
$mbox = imap_open("{host:143}", "mail id", "password");
echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{host:143}", "*");
if ($folders == false) {
echo "Call failed<br />\n";
} else {
while (list ($key, $val) = each($folders)) {
echo $val . "<br />\n";
}
}
echo "<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);
?>