用Socket发送电子邮件(利用需要验证的SMTP服务器(2)

}
function docommand()
{
socket_write ($this->socket, $this->in, strlen ($this->in));
$this->debug_show("客户机命令:".$this->in);
$this->result_str = "服务器应答:<font color=#cc0000>".socket_read ($this->socket, 1024)."</font>";
$this->debug_show($this->result_str);
}
}
//这个是我做的测试,我用的是smtp.163.com,那你的信箱也必须是163.com的,要不人家不让你发!!
//你用这个类的时候你修改成你自己的信箱就可以了
$smtp  =   new smtp_mail("smtp.163.com","25","你的163.com的帐号","你的密码");
//如果你需要显示会话信息,请将上面的修改成
//$smtp  =   new smtp_mail("smtp.163.com","25","你的163.com的帐号","你的密码",true);
$smtp->send("你的163.com的帐号@163.com","目标地址","你好","你好");
?>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/de993250752b321cd17b2096d2ad36e1.html