<span class="unnamed3">很实用的一个完整email发送程序,很简单,把下列代码复制到一个空白文本页面,如index.php,运行就行了。具体实例:http://zsvalley.uhome.net/email/index.php。 <br>以下是完整的源代码:(有任何问题请email:zsvalley@cmmail.com) <br><br> <br><br>if ($ok=='yes'){ <br>// SetCookie("yname", $yname); <br>// SetCookie("yemail", $yemail); <br><br> if (!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$yemail)){ <br> <br> echo "请正确填写您的EMAIL地址! <a href="javascript:history.go(-1)">返回</a>"; <br> <br> }elseif(!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$femail)){ <br> <br> echo "请正确填写您好友的EMAIL地址! <a href="javascript:history.go(-1)">返回</a>"; <br><br> }else{ <br><br> $message=$fname.",你好:nn你的朋友".$yname."特地来信想对向您说:n-----------------------------------n".$comments."n-----------------------------------nnn提供服务:http://zsvalley.uhome.net/email/nn◆◆◆ valley网络无界限 http://valley.coc.cc ◆◆◆n─────────────────────────n"; <br><br> //email发送 <br> mail($femail, $title, $message,"From: $yemail"); <br>//echo nl2br($message); <br> $ok='no'; <br> echo "".nl2br($message)."<br><br><a href="index.php">回到发送页面</a><script language="javascript"> alert("发送成功!"); </script>"; <br><br> } <br> exit(); <br>} <br>?> <br><br> <br> <br><title>将网页推荐给好友</title> <br><meta content="text/html; charset=gb2312" http-equiv="Content-Type"> <br><style type="text/css">BODY { <br/> FONT-SIZE: 14px; LINE-HEIGHT: 18px <br/>} <br/>TD { <br/> FONT-SIZE: 14px; LINE-HEIGHT: 18px <br/>} <br/>.st1 { <br/> BACKGROUND-COLOR: #ffcc66; BORDER-BOTTOM: #ffcc66 1px solid; BORDER-LEFT: #ffcc66 1px solid; BORDER-RIGHT: #ffcc66 1px solid; BORDER-TOP: #ffcc66 1px solid; COLOR: #aa0000; FONT-SIZE: 9pt <br/>} <br/>.st2 { <br/> BACKGROUND-COLOR: #ffcc66; BORDER-BOTTOM: #ec9f00 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ec9f00 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #aa0000; FONT-SIZE: 9pt; HEIGHT: 20px; WIDTH: 60px <br/>} <br/></style> <br><script language="JavaScript" runat="Server"> <br/>function check() <br/>{ <br/> if (document.frmSend.yname.value.length<1) <br/> { <br/> alert("璇峰~</script></span>