怎样通过imap收信??用php写,急!!!!!! 没有,主要是时间来不及了,那位大哥有现成的class最好了,要多少分都可以!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $mbox=imap_open("{localhost:110}inbox","xqi8","01022112");$message=imap_body($mbox,1);imap_close($mbox);echo $message; $server = "{263.net/pop3}";$mailbox = "inbox";$mailaccount = "xxxxx";//帐号$mailpasswd = "yyyyy";//密码$stream = imap_open($server.$mailbox,$mailaccount,$mailpasswd);$mail_number = imap_num_msg($stream);//信件个数for($i=1;$i<=$mail_number;$i++){ $mail_header= imap_headerinfo($stream, $msgnum); $subject = $mail_header->subject;//标题 $from = $mail_header->fromaddress;//发件人 $date = $mail_header->date;//日期 echo "<a href=readmail.php>$subject</a> $from $date <br>";} -------读邮件------$stream = imap_open($server.$mailbox,$mailaccount,$mailpasswd);$struct = imap_fetchstructure($stream, $number);$encoding = $struct->encoding;$body = imap_fetchbody ($stream, $number,1);switch($encoding){ case 3: $body = imap_base64($body); $body = nl2br($body); break; case 4: $body = imap_qprint($body); break;} 想不辞而别,大家给点意见 一个鼠标事件,单击后让数据库中一个整形字段加一 PHP: 知道了年月日三个变量,如何换算出明天的年月日? ldap_search的问题 这个好像在PHP行不通 如何将一个页面定义成一个变量存放到数据库 我喜欢的PHP为何受到岐视? 请问apache如何与本地应用程序通讯? 我无法在页面上显示页面文件路径 用phpmailer发邮件如何点击按钮发送邮件 在linux下调试时,session出了问题!急!在线等待! 呜呜........大家帮我看看,我的程序怎么不对,在线等待!
$message=imap_body($mbox,1);
imap_close($mbox);
echo $message;
$mailbox = "inbox";
$mailaccount = "xxxxx";//帐号
$mailpasswd = "yyyyy";//密码
$stream = imap_open($server.$mailbox,$mailaccount,$mailpasswd);
$mail_number = imap_num_msg($stream);//信件个数for($i=1;$i<=$mail_number;$i++)
{
$mail_header= imap_headerinfo($stream, $msgnum);
$subject = $mail_header->subject;//标题
$from = $mail_header->fromaddress;//发件人
$date = $mail_header->date;//日期
echo "<a href=readmail.php>$subject</a> $from $date <br>";
}
$stream = imap_open($server.$mailbox,$mailaccount,$mailpasswd);
$struct = imap_fetchstructure($stream, $number);
$encoding = $struct->encoding;
$body = imap_fetchbody ($stream, $number,1);
switch($encoding)
{
case 3:
$body = imap_base64($body);
$body = nl2br($body);
break;
case 4:
$body = imap_qprint($body);
break;
}