Home > Backend Development > PHP Tutorial > email.class.php问题

email.class.php问题

WBOY
Release: 2016-06-23 14:39:26
Original
1125 people have browsed it

想做一个发送邮件的功能,然后从网上搜了这个文件,但是完全发不出去,也不知道哪里错误,调过了,还是没办法发送这样
返回的如下:
MIME-Version:1.0 Content-Type:text/html To: 1342830239@163.com From: jkfljy@gmail.com Subject: 激活码 Date: Wed, 11 Dec 2013 05:24:37 +0000 X-Mailer:By Redhat (PHP/5.3.8) Message-ID:  


回复讨论(解决方案)

把你的发送代码贴出来看看

把你的发送代码贴出来看看

<?phprequire_once ('../conn/email.class.php');$smtpserver = "smtp.gmail.com";//SMTP服务器$smtpserverport = 587;//SMTP服务器端口$smtpusermail = "jkfljy@gmail.com";$smtpemailto= "1342830239@163.com";$smtpuser = "我的账号";$smtppass = 我的密码;$mailsubject = "激活码";$mailbody = "<a href=http://localhost/a.php?id=3>点击http://localhost/a.php?id=3</a>";$mailtype = "HTML";$smtp = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass);$smtp->debug = FALSE;$smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);?>
Copy after login

我刚刚测在本地试过一个邮件发送程序,分享给你看看。我放在金山网盘中的
http://www.kuaipan.cn/file/id_7704522789018102.htm?source=1

找个php email class 参照例子,给予参数即可。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template