您的位置:首页 > 编程语言 > PHP开发

php发送邮箱

2016-07-05 20:06 316 查看
1.建立一个send.html页面

<meta charset="utf-8"/>
<form action="mail_send.php" method="post">
<p>收件人:<input type="text" name="toman" /></p>
<p>标  题:<input type="text" name="title" /></p>
<p>内  容:<textarea name="content" cols="50" rows="5"></textarea></p>
<p>发件人:<input type="text" name="fromman" /></p>
<p><input type="submit" value="发送" /></p>
</form>

2.跳转到mail_send.php 页面 。mail_send.php中包含Mail.class.php类

如果找不到mail_send.php 没有关系 点击这个网址 复制代码重新建一个mail_send.php(http://blog.csdn.net/haoyunyun888/article/details/51245076)

3.Mail.class.php中包含class.phpmailer.php这个类  

和上边一样,找不到mail.class.php 没有关系 点击这个网址复制代码重新建一个mail.class.php(http://blog.csdn.net/haoyunyun888/article/details/51245049)

class.phpmailer.php这个类可以点击点击这个网址复制代码重新建一个(http://blog.csdn.net/haoyunyun888/article/details/51245003)

4.在mail.class.php中主要需要填写的是发件人、发件人内容、收件人

5.完成发送email
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: