Using the below script should give me the number of messages in my inbox and how many that's not read, right? If so, how come it doesn't work? or is there something else that's wrong? I get the correct number of mails in my box, but it never tells me one is unread...
Someone got a clue on how to get this working or another nice snippet that does the same?
Code:
$mbox = imap_open("{localhost}","ACCOUNT","PASSWORD",OP_HALFOPEN);
$status = imap_status($mbox,"{localhost}INBOX",SA_ALL);
if($status) {
print("Messages: ". $status->messages )."<br>\n";
print("Unseen: ". $status->unseen )."<br>\n";
}
imap_close($mbox);
Someone got a clue on how to get this working or another nice snippet that does the same?
Code:
$mbox = imap_open("{localhost}","ACCOUNT","PASSWORD",OP_HALFOPEN);
$status = imap_status($mbox,"{localhost}INBOX",SA_ALL);
if($status) {
print("Messages: ". $status->messages )."<br>\n";
print("Unseen: ". $status->unseen )."<br>\n";
}
imap_close($mbox);