<?php session_start();
header('Content-Type: text/xml');
$hostname=$_SESSION[host];
$username=$_SESSION[user];
$userpwd=$_SESSION[pwd];
if(!$mbox=@imap_open("$hostname","$username","$userpwd")){
   echo "<script>alert('µÇÂ¼³¬Ê±£¬ÇëÖØÐÂµÇÂ¼!');history.back();</script>";
   exit;
}
 $check = imap_check($mbox);
		  $sum=$check->Nmsgs;

echo $sum;
?>


