PHP Classes

total messenge

Recommend this page to a friend!

      Clear MBox Class  >  All threads  >  total messenge  >  (Un) Subscribe thread alerts  
Subject:total messenge
Summary:can't find right information
Messages:2
Author:Alidad Modjtabai
Date:2009-06-06 22:22:38
Update:2009-06-09 10:38:45
 

  1. total messenge   Reply   Report abuse  
Picture of Alidad Modjtabai Alidad Modjtabai - 2009-06-06 22:22:38
hi, I'm php rookie guy, and i'm still learning php. I was looking for total number of messenge email or total number of inbox, i found few of them but none of those were working right.

Does any one can help me where do i can find sample code of total number of unread email so i can use that for my project please thanks.

AM

  2. Re: total messenge   Reply   Report abuse  
Picture of Pierre FAUQUE Pierre FAUQUE - 2009-06-09 10:38:45 - In reply to message 1 from Alidad Modjtabai
Hello Alidad,

This is a short commented example :

<?php
// ----- example --------------------------------------------------
// mail address = john.doe@wanadoo.fr
// mail account = john.doe@pop.wanadoo.fr (not real address)
// protocol : pop3
// pop server port : 110
// --------
// see the PHP functions : imap_open() and imap_check()
// Syntax of imap_open() :
// $var = imap_open ("{mailhost:port/protocol}", "your.mail.login", "your_password");
// ----------------------------------------------------------------
$mailbox = imap_open("{pop.wanadoo.fr:110/pop3}", "john.doe", "zK5cg12Qf");
$checkmbox = imap_check($mailbox);
echo "Nb de messages : " . $checkmbox->Nmsgs;
?>

Is this example clear and satisfactory for you ?

Pierre