php读取邮件
<?php header("Content-type: text/html; charset=utf-8"); class mail { private $server=''; private $username=''; private $password=''; private $marubox=''; private $email=''; public function __construct ($username,$password,$email_address,$mail_server,$server_type,$port,$ssl=false) { if($server_type == 'imap') { if($port=='') $port='143'; $str_connect = '{'.$mail_server.'/imap:'.$port.'}INBOX'; }else{ if($port=='') $port='110'; $str_connect = '{'.$mail_server.':'.$port. '/pop3'.($ssl ? "/ssl" : "").'}INBOX'; } $this->server = $str_connect; $this->username = $username; $this->password = $password