bsp; $this->bolIsLogin = true; return true; } //退出登录 function popLogout() { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; } $this->sendCommand("QUIT"); $this->getLineResponse(); if (!$this->getRestIsSucceed()) { return false; } return true; } //获取是否在线 function getIsOnline() { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; } $this->sendCommand("NOOP"); $this->getLineResponse(); if (!$this->getRestIsSucceed()) { return false; } return true; } //获取邮件数量和字节数(返回数组) function getMailSum($intReturnType=2) { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; } $this->sendCommand("STAT"); $strLineResponse = $this->getLineResponse(); if (!$this->getRestIsSucceed()) { return false; } if ($intReturnType==1) { return $this->strResponse; } else { $arrResponse = explode(" ", $this->strResponse); if (!is_array($arrResponse) || count($arrResponse)<=0) { $this->setMessage('STAT command response message is error', 2006); return false; } return array($arrResponse[1], $arrResponse[2]); } } //获取指定邮件得Session Id function getMailSessId($intMailId, $intReturnType=2) { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; } if (!$intMailId = intval($intMailId)) { $this->setMessage('Mail message id invalid', 1005); return false; } $this->sendCommand("UIDL ". $intMailId); $this->getLineResponse(); if (!$this->getRestIsSucceed()) { return false; } if ($intReturnType == 1) { return $this->strResponse; } else { $arrResponse = explode(" ", $this->strResponse); if (!is_array($arrResponse) || count($arrResponse)<=0) { $this->setMessage('UIDL command response message is error', 2006); return false; } return array($arrResponse[1], $arrResponse[2]); } } //取得某个邮件的大小 function getMailSize($intMailId, $intReturnType=2) { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; } $this->sendCommand("LIST ".$intMailId); $this->getLineResponse(); if (!$this->getRestIsSucceed()) { return false; } if ($intReturnType == 1) { return $this->strResponse; } else { $arrMessage = explode(' ', $this->strResponse); return array($arrMessage[1], $arrMessage[2]); } } //获取邮件基本列表数组 function getMailBaseList($intReturnType=2) { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; } $this->sendCommand("LIST"); $this->getLineResponse(); if (!$this->getRestIsSucceed()) { return false; } return $this->getRespMessage($intReturnType); } //获取指定邮件所有信息,intReturnType是返回值类型,1是字符串,2是数组 function getMailMessage($intMailId, $intReturnType=1) { if (!$this->getIsConnect() && $this->bolIsLogin) { return false; &nb 上一页 [1] [2] [3] [4] 下一页
 |
频道声明:本频道的文章除部分特别声明禁止转载的专稿外,可以自由转载.但请务必注明出出处和原始作者 文章版权归本频道与文章作者所有.对于被频道转载文章的个人和网站,我们表示深深的谢意。
| 原始作者:佚名 |
录入时间:2007-1-3 3:34:28 |
| 信息来源:不详 |
投稿信箱:itqoo@126.com |
|
|
 |
|