邮件发送、失败
程序员文章站
2024-01-21 18:48:34
...
求助:邮件发送、、、失败
提示错误:
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: 1037572236@qq.com From: 1037572236@qq.com 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
- PHP code
require_once ('email.class.php'); //########################################## $smtpserver = "smtp.qq.com";//SMTP服务器 $smtpserverport =25;//SMTP服务器端口 $smtpusermail = "1037572236@qq.com";//SMTP服务器的用户邮箱 $smtpemailto = "1037572236@qq.com";//发送给谁 $smtpuser = "1037572236";//SMTP服务器的用户帐号 $smtppass = $pw;//SMTP服务器的用户密码 $mailsubject = "PHP100测试邮件系统";//邮件主题 $mailbody = "这是一个测试程序 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: 1037572236@qq.com From: 1037572236@qq.com 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
相关文章
相关视频