Page 1 of 1
total email...
Posted: Sat Jun 06, 2009 4:44 pm
by Alidad
Hi, does anyone know where i can find how to create php total number of email or total number of unread email just like facebook.com showing total number of inbox.
I'm trying to find from google but for some reason i could not find it.
does any one know where i can find the sample of php code relate to total number of new email!
please help thanks.
AM
Re: total email...
Posted: Sat Jun 06, 2009 6:40 pm
by Weirdan
Re: total email...
Posted: Sat Jun 06, 2009 7:20 pm
by Alidad
thank you so much for that link i have checked that and i see they are many list of imap's, do you know which of those list do i need to focuse on total number of unread email!
Alidad
Re: total email...
Posted: Sun Jun 07, 2009 3:22 am
by Weirdan
Those ones that have *num* substring in their names, I guess.
Re: total email...
Posted: Sun Jun 07, 2009 4:16 am
by onion2k
Alidad wrote:thank you so much for that link i have checked that and i see they are many list of imap's, do you know which of those list do i need to focuse on total number of unread email!
Another example of one of PHP's failings - the fact there's a function for almost everything means you're assuming there's a function for what you want. There isn't. You'll need to write code that connects to an imap enabled mail server, logs in, checks the number of new messages, and returns that number to you. I recommend you read the documentation for imap_open() and imap_status(). There's a good example in the comments on
http://uk2.php.net/manual/en/function.imap-status.php .
Of course, all this depends on your server having the IMAP extension installed, and your user's mailbox being IMAP enabled. If you don't meet either of those conditions you'll need to take a different approach.
Re: total email...
Posted: Sun Jun 07, 2009 8:45 am
by Weirdan
onion2k wrote:Of course, all this depends on your server having the IMAP extension installed, and your user's mailbox being IMAP enabled. If you don't meet either of those conditions you'll need to take a different approach.
Onion, imap extension has support for POP3 and NNTP too.