I have been trying to open a mailbox using PHP and the imap_open() function. However, everytime I access the page, it just hangs for ages and eventually comes back with page not found!
After trying to fix for a while I copied the code from the PHP manual to open the mailbox, but exactly the same happens.
$mbox = imap_open ("{mail.ventforth.net:110}", "mikehoward", "tvrdb7");
echo "<p><h1>Mailboxes</h1>\n";
$folders = imap_listmailbox ($mbox, "{mail.ventforth.net:110}", "*");
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);
Any ideas?