netadmin Posted April 21, 2007 Posted April 21, 2007 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.
webman Posted April 21, 2007 Posted April 21, 2007 Hi, According to the PHP website, this (in a nutshell) should work: //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); Failing that, you could try PHP Classes for a more complete class that will help with all aspects of IMAP interaction.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now