Does anyone know of a php script that will open an IMAP mailbox and echo the number of unread messages (You have X unread messages)?
I am trying to design a portal for our staff members, so they can see at a glance whether they have new email.
Does anyone know of a php script that will open an IMAP mailbox and echo the number of unread messages (You have X unread messages)?
I am trying to design a portal for our staff members, so they can see at a glance whether they have new email.

Hi,
According to the PHP website, this (in a nutshell) should work:
Failing that, you could try PHP Classes for a more complete class that will help with all aspects of IMAP interaction.Code://check for new messages $mailbox = imap_open("{localhost/pop3:110}INBOX","#username#","#password#"); // Check messages $check = imap_check($mailbox); print("Number of messages : " . $check->Nmsgs);
Works perfect!![]()
Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)