mail...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hareldo
Forum Newbie
Posts: 8
Joined: Sun Jun 22, 2008 7:50 am

mail...

Post 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??
hareldo
Forum Newbie
Posts: 8
Joined: Sun Jun 22, 2008 7:50 am

Re: mail...

Post by hareldo »

anyone?!?!?
Post Reply