$mbox  = imap_open(…);

$MC = imap_check($mbox);

die(var_dump($MC->Nmsgs));

 

// Fetch an overview for all messages in INBOX

$result = imap_fetch_overview($mbox,”1:{$MC->Nmsgs}”,0);

foreach ($result as $overview) {

   echo “#{$overview->msgno} ({$overview->date}) - From: {$overview->from}

   {$overview->subject}\n”;

}

imap_close($mbox);
这是一段常用的代码,在我这去不工作 ,imap_check可以,但是imap_fetch_overview不可以。郁闷,算了,绕道!

Posted in 未分类 at 12月 13th, 2008. No Comments.