求助:邮件发送、、、失败
PHP code<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?require_once ('email.class.php');//##########################################$smtpserver = "smtp.qq.com";//SMTP服务器$smtpserverport =25;//SMTP服务器端口$smtpusermail = "[email protected]";//SMTP服务器的用户邮箱$smtpemailto = "[email protected]";//发送给谁$smtpuser = "1037572236";//SMTP服务器的用户帐号$smtppass = $pw;//SMTP服务器的用户密码$mailsubject = "PHP100测试邮件系统";//邮件主题$mailbody = "<h1> 这是一个测试程序 PHP100.com ";//邮件内容$mailtype = "HTML";//邮件格式(HTML/TXT),TXT为文本邮件##########################################$smtp = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass);//这里面的一个true是表示使用身份验证,否则不使用身份验证.$smtp->debug = true;//是否显示发送的调试信息$smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);?>
提示错误:
Trying to smtp.qq.com:25
220 smtp.qq.com Esmtp QQ Mail Server
Connected to relay host smtp.qq.com
> HELO localhost
250 smtp.qq.com
> AUTH LOGIN MTAzNzU3MjIzNg==
Error: Remote host returned ""
Error: Error occurred while sending HELO command.
Error: Cannot send email to
Disconnected from remote host
MIME-Version:1.0 Content-Type:text/html To: [email protected] From: [email protected] Subject: PHP100测试邮件系统 Date: Thu, 15 Sep 2011 08:26:15 +0000 X-Mailer:By Redhat (PHP/5.2.5) Message-ID:
------解决方案--------------------smtp.qq.com qq有提供SMTP,POP3?
------解决方案--------------------是否安装了smtp service
25端口是否开启
------解决方案--------------------腾讯的发送邮件服务器:smtp.qq.com,使用SSL,端口号465或587
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn