很实用的一个完整email发送程序
Release: 2016-06-21 09:02:55
Original
1306 people have browsed it
很实用的一个完整email发送程序,很简单,把下列代码复制到一个空白文本页面,如index.php,运行就行了。具体实例:http://zsvalley.uhome.net/email/index.php。
以下是完整的源代码:(有任何问题请email:zsvalley@cmmail.com)
if ($ok=='yes'){
// SetCookie("yname", $yname);
// SetCookie("yemail", $yemail);
if (!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$yemail)){
echo "请正确填写您的EMAIL地址! 返回";
}elseif(!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$femail)){
echo "请正确填写您好友的EMAIL地址! 返回";
}else{
$message=$fname.",你好:nn你的朋友".$yname."特地来信想对向您说:n-----------------------------------n".$comments."n-----------------------------------nnn提供服务:http://zsvalley.uhome.net/email/nn◆◆◆ valley网络无界限 http://valley.coc.cc ◆◆◆n─────────────────────────n";
//email发送
mail($femail, $title, $message,"From: $yemail");
//echo nl2br($message);
$ok='no';
echo "".nl2br($message)."
回到发送页面";
}
exit();
}
?>
将网页推荐给好友
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31