Hi,
I'm using the imap functions to read my email online. I'm using imap_fetch_overview to grab the header info but I can't get it to recognise new/unread messages.
The code I'm using is...
$overview=imap_fetch_overview($imap,"1:".imap_num_msg($imap),0);
$s=sizeof($overview);
for($i=$s-1; $i >= 0; $i--) {
$val=$overview[$i];
$seen = $val->seen;
$recent = $val->recent;
}
if ($seen == 'u' || $recent == 'n'){
echo 'N';
}
else {
echo 'R';
}
In theory, if a message if recent and not seen, or if not seen AND not recent it should display 'N'.
Ben