返回站点首页
支持中心首页
常见问题搜索
常见问题
域名相关问题
空间相关问题
邮箱相关问题
智能建站相关问题
繁简通相关问题
中文域名相关问题
代理申请相关问题
 

   

PHP
发邮件的例程
<?
if($send){
$hearer="From:$from\nReply-To:$from\nX-Mailer: PHP/".phpversion()."\nContent-Type:text/html";
$result=mail($to,$subject,$body,$hearer);
if($result)
echo "邮件已成功发送";
}
?>
<html>
<body>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#6699FF">
<form method="post">
<tr bgcolor="#E7E7CB">
<td width="20%" height="26">发件人:</td>
<td width="80%"><input name="from" type="text"></td>
</tr>
<tr bgcolor="#E7E7CB">
<td height="25">收件人:</td>
<td><input name="to" type="text"></td>
</tr>
<tr bgcolor="#E7E7CB">
<td height="24">邮件标题:</td>
<td><input name="subject" type="text" size="50"></td>
</tr>
<tr bgcolor="#E7E7CB">
<td height="27">邮件内容:</td>
<td><textarea name="body" cols="60" rows="10"></textarea></td>
</tr>
<tr bgcolor="#E7E7CB">
<td height="28"> </td>
<td>
<input type="hidden" value="1" name="send">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</table>
</body>
</html>

返回