最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
POPMail类很简单的功能
时间:2022-07-02 10:32:24 编辑:袖梨 来源:一聚教程网
class popMail
{
var $user='[email protected]';
var $pwd='1234';
var $popFp;
var $msg;
var $welcome = '欢迎使用PHP接收邮件!';
function popMail($popHost='pop.tom.com',$popPort=110)
{
$this->msg = array();
$this->msg[] = $this->welcome;
if ( $this->openPop($popHost,$popPort))
{
$this->msg[] = 'pop server connect success!';
}else{
print_r( $this->msg );
}
}
function checkCommon($com,$msg)
{
echo $cod = empty($com)? $this->getServerMsg() : $this->putServerMsg( $com );
$this->msg[] = ereg( "^ OK" ,$cod )? $msg : $com .' exec is fauiler!error:'.$cod ;
if( !ereg( "^ OK" ,$cod ) )
{
echo $cod;
print_r($this->msg);
$this->closeStmp();
exit(0);
}
}
function init()
{
$greeting='';
$rn=' ';
//$this->checkCommon('',"connect");
//echo $this->putServerMsg("APOP ".$this->user ." ".$this->pwd.$rn);
// $this->checkCommon("USER ",'user');
echo $this->putServerMsg("USER $this->user".$rn);
echo $this->putServerMsg("PASS $this->pwd".$rn);
print_r( $this->msg );
}
function openPop($popHost,$popPort=110)
{
if( empty($popHost) )
{
$this->msg[] = 'pop host is null!';
return false;
相关文章
- 棕色尘埃2下半年卡池规划 棕色尘埃2下半年活动一览 10-23
- 逃离鸭科夫钥匙房在哪里 逃离鸭科夫钥匙房位置分享 10-23
- 逃离鸭科夫神秘钥匙怎么获得 逃离鸭科夫神秘钥匙o和神秘钥匙x获取方式 10-23
- 绝区零般岳有什么技能 10-23
- 无期迷途伊蕾娅有哪些玩法技巧 10-23
- 逃离鸭科夫联机mod怎么安装 逃离鸭科夫怎么和朋友联机 10-23