好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

php发送邮件代码-用mail - 综合实例

php发送邮件代码-用mail

这是一款免费的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  ( empty empty ( $from )  or   empty empty ( $subject )  or   empty empty ( $content )) {    echo   "没有完成填写,请<a href='mail.html'>返回</a>" ;  }   $body = "[主题] $subjectn" ;   $body .= "[发件人] $fromn" ;   $body .= $content ;   $deal =mail( "guoanyuan@eyou测试数据" , $subject , $body , "From:$from" );   if  ( $deal ) { echo   "寄件成功!" ;} else { echo   "寄件失败HdhCmsTest111cn.net!!!" ;}   ?> 

查看更多关于php发送邮件代码-用mail - 综合实例的详细内容...

  阅读:48次