文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>网上找到的两个PHP发送邮件的例子,很不错,贴出来给初学者参考吧(不知道是否有兄弟曾贴过),呵呵(2)

网上找到的两个PHP发送邮件的例子,很不错,贴出来给初学者参考吧(不知道是否有兄弟曾贴过),呵呵(2)

时间:2007-02-17  来源:PHP爱好者

Advanced Example

Here we will show the full capabilities of the PHP mail function.

PHP Code:
<?php

echo "<html><body>";

$recipient = "Kris Arndt <[email protected]>,[email protected]";
$subject = "Testing the mail function";
$message = "Hello!nnThis is the body of the message.nn";
$extra = "From: [email protected]: [email protected]";

mail ($recipient, $subject, $message, $extra);

echo "Sending mail...";
echo "</body></html>";

?>


We send an email to two people this time, by putting two email addresses in the recipient field and separating them with commas.

The fourth parameter holds extra headers for the email.  We specify who the email was from and who the recipient should reply to.  When entering multiple headers, separate them with the line feed and new line combination ('rn').
php爱好者站 http://www.phpfans.net PHP|MySQL|javascript|ajax|html.
相关阅读 更多 +
排行榜 更多 +
建筑模拟器最新版

建筑模拟器最新版

模拟经营 下载
素人改造师最新版

素人改造师最新版

模拟经营 下载
外星战士幸存者手机版

外星战士幸存者手机版

飞行射击 下载