So i moved into the PHP area and done the basic connect code (the full code i used is below so check that, im sure its right, i basically copied it) which seemed to work, i got the result: "Resource Id #2" Should that be "#4" instead? One tut said i would get #4 so maybe the error lies here...
Anyway it connected and disconnected with no errors so i procceeded to use Imap_headers($connect); to get the headers of the emails.. Oh no.. It didnt work...The error detection code just told me it had failed with the variable i used to contain the header info returning a FALSE result and as such it just didnt work.... Any ideas? I really cant think of it. My PHPINFO tells me i have IMAP libs installed with the readout being:
QUOTE
IMAP c-Client Version 2004
SSL Support enabled
SSL Support enabled
And as i said the mercury mail server seems to support IMAP and POP so what else can it be? I have just updated to the latest version of PHP and checked that the PHP.INI file contains the right filepath for the IMAP DLL. Im all out of ideas! The code ive used is below and is virtually copied with the changing of a few variable names:
CODE
<?
$user = "phptest";
$pass = "test";
$connect = @imap_open("{localhost}INBOX", $user, $pass)
or die("Connection to server failed");
echo $connect;
$headers = @imap_headers($connect)
or die("Couldn't get emails");
$numEmails = sizeof($headers);
echo "You have $numEmails in your mailbox";
imap_close($connect);
$user = "phptest";
$pass = "test";
$connect = @imap_open("{localhost}INBOX", $user, $pass)
or die("Connection to server failed");
echo $connect;
$headers = @imap_headers($connect)
or die("Couldn't get emails");
$numEmails = sizeof($headers);
echo "You have $numEmails in your mailbox";
imap_close($connect);

