<?php
$fp = fsockopen('smtp.qq.com', 25);fwrite($fp, "ehlo hello\r\n");fwrite($fp, "auth login\r\n");fwrite($fp, base64_decode('wanyujun')."\r\n");fwrite($fp, base64_decode('wan5881241')."\r\n");fwrite($fp, "mail from:<[email protected]>\r\n");fwrite($fp, "rcpt to:<[email protected]>\r\n");fwrite($fp, "data\r\n");fwrite($fp, "from:[email protected]\r\n");fwrite($fp, "to:[email protected]\r\n");fwrite($fp, "subject:titles\r\n");fwrite($fp, "asdfasdfasdfasdfasdfasdf\r\n");fwrite($fp, ".\r\n");
echo fgets($fp, 1024);这段代码有什么错误吗?
为什么发送不成功呢?输出信息:220 163.com Anti-spam GT for Coremail System (163com[20090903]) 感谢