这是一款免费的php发送邮件代码-用mail哦,是基础php自身的上传函数.
- <html>
- <head>
- <title>发信给网管</title>
- </head>
- <body>
- <h2 align="center">网管收信</h2><br>
- <hr><br>
- <center>
- <form action="mail.php">
- 发件人:<input type="text" name="from" size=25><br>
- 主题:<input type="text" name="subject" size=20><br>
- 内容:
- <textarea name="content" cols=80 rows=15>你好,站长:</textarea><br>
- <input type="submit" value="寄出"> <input type="reset" value="重写"><br>
- </form>
- </body></html>
php代码
- <?php
- if (emptyempty($from) or emptyempty($subject) or emptyempty($content)) {
- echo "没有完成填写,请<a href='mail.html'>返回</a>";
- }
- $body="[主题] $subjectn";
- $body.="[发件人] $fromn";
- $body.=$content;
- $deal=mail("guoanyuan@eyou.com",$subject,$body,"From:$from");
- if ($deal) {echo "寄件成功!";}else{echo "寄件失败www.111cn.net!!!";}
- ?>
新闻热点
疑难解答