Page 1 of 1

mail...

Posted: Sun Jun 22, 2008 7:57 am
by hareldo
this code supposed to wrtie how many mails i have in my mailbox in gmail:

Code: Select all

<?php
   $ServerName = "{pop.gmail.com:995/pop3/ssl/novalidate-cert}";
   
   $UserName = "user";
   $PassWord = "pass";
   
   $mbox = imap_open($ServerName, $UserName,$PassWord) or die("Could not open Mailbox - try again later!");
   
   if ($hdr = imap_check($mbox)) {
    echo "Num Messages " . $hdr->Nmsgs;
   } else {
    echo "failed";
?>
when i used this code at the first time,it wrote exacly how many mail i have,but every time when i used it again its wrote one mail less.
what the problem??

Re: mail...

Posted: Sun Jun 22, 2008 11:31 pm
by hareldo
anyone?!?!?