Associate
I wanted to add an email viewing page in the secure area on my website.
I looked into modifying horde, but found a simple example of just using php.
But can't get it to work
It doesn't work. I used to get invalid stream warnings, but now just a blank screen in opera, or a 404 error in IE.
I put the same imap settings in outlook and it worked first time, so i think its the code, not my config.
Could it also be php blocking an external email connection??
Here's a link to the servers php info if its helpful:
http://www.adam3223.com/phpinfo.php
Can anyone help?
(or explain a bit about modding horde)
I looked into modifying horde, but found a simple example of just using php.
But can't get it to work
Code:
<?php
$mbox = imap_open("{mail.adam3223.com:143}", "[email protected]", "pwd");
echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{mail.adam3223.com:143}", "*");
if ($folders == false) {
echo "Call failed<br />\n";
} else {
foreach ($folders as $val) {
echo $val . "<br />\n";
}
}
echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);
if ($headers == false) {
echo "Call failed<br />\n";
} else {
foreach ($headers as $val) {
echo $val . "<br />\n";
}
}
imap_close($mbox);
?>
It doesn't work. I used to get invalid stream warnings, but now just a blank screen in opera, or a 404 error in IE.
I put the same imap settings in outlook and it worked first time, so i think its the code, not my config.
Could it also be php blocking an external email connection??
Here's a link to the servers php info if its helpful:
http://www.adam3223.com/phpinfo.php
Can anyone help?
(or explain a bit about modding horde)