Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

imap_status not working, how do I do?

Status
Not open for further replies.

blekfis

Programmer
Oct 19, 2001
38
SE
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(&quot;Messages: &quot;. $status->messages ).&quot;<br>\n&quot;;
print(&quot;Unseen: &quot;. $status->unseen ).&quot;<br>\n&quot;;
}

imap_close($mbox);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top