输入:
function mark_email_as_read() {
if (isset($_SESSION['talent_user_id']) and $_SESSION['talent_user_id'] > 0) {
$peek = $this->peek();
$uid = $this->common_model->search_get($this->url, 'uid');
$msgno = imap_msgno($this->imap, $uid);
$user_id = $_SESSION[$this->session_prefix.'_user_id'];
$acc = $this->common_model->search_get($this->url,'acc');
$folder = $this->common_model->search_get($this->url,'accfolder');
$ssl = false;
$ssl=($ssl==false)?"/novalidate-cert":"";
$host = $this->email_accounts[$this->the_helpdesk_view][$this->the_helpdesk_company]['server'];
$port = $this->email_accounts[$this->the_helpdesk_view][$this->the_helpdesk_company]['port'];
$folder = $this->email_accounts[$this->the_helpdesk_view][$this->the_helpdesk_company]['folder'];
$user = $this->email_accounts[$this->the_helpdesk_view][$this->the_helpdesk_company]['user'];
$pass = $this->email_accounts[$this->the_helpdesk_view][$this->the_helpdesk_company]['pass'];
$this->imap = imap_open("{"."$host:$port/imap$ssl"."}$folder", $user, $pass) or die("can't connect: " . imap_last_error());
$imap = $this->imap;
$msgnum = imap_msgno($imap, $msgno);
if ($peek==true) {
imap_clearflag_full($imap, $msgnum, '\flagged');
echo"oh dear";
} else {
imap_setflag_full($imap, $msgnum, '\seen');
echo"set";
}
echo "its working i think";
imap_headers($this->imap);
echo"well its got here";
}
}
输出:
它没有显示任何东西,但它不会标记为Seen。你能帮忙吗?