Beispiel #1
0
$imap->username = "******";
$imap->userpwd = "105080";
/*
$imap=new MailImap;
$imap->hostname="pop.163.com";
$imap->port=110;
$imap->username="******";
$imap->userpwd="iloveyou";
*/
//-----------------------------------------------------------------------------
$imap->open();
$imap->get_mailbox();
if ($page == "") {
    $page = 0;
}
$getMailInfo = $imap->check_mailinfo(10, $page);
if ($getMailInfo[info]->Nmsgs > 0) {
    //echo "您邮箱:".$mboxinfo->Mailbox."<br>";
    echo $imap->username . "@" . $imap->hostname . "的收件箱里共有邮件数:" . $getMailInfo[info]->Nmsgs . "<br>\n";
    echo "未读邮件数:" . $getMailInfo[info]->Unread . " ";
    echo "新邮件数:" . $getMailInfo[info]->Recent . " ";
    echo "总共占用空间:";
    echo $getMailInfo[info]->Size > 1024 ? sprintf("%.0f kb", $getMailInfo[info]->Size / 1024) : $getMailInfo[info]->Size;
    echo "字节<br>\n";
    $last_page = ceil($getMailInfo[info]->Nmsgs / 10);
    $cur_page = $page + 1;
    echo "第" . $cur_page . "页,共" . $last_page . "页。\n";
} else {
    echo "您的信箱里没有邮件。<br><hr>\n";
}
echo "<table border=1 width=100% cellpadding=2 cellspacing=0 bordercolorlight=#000080 bordercolordark=#ffffff style=\"font:9pt Tahoma,宋体\">\n";