最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
网上找到的两个PHP发送邮件的例子,很不错,贴出来给初学者参考吧(不知道是否有兄弟曾贴过),呵呵(2
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
Advanced Example
Here we will show the full capabilities of the PHP mail function.
PHP Code:
echo "";
$recipient = "Kris Arndt,npl@nucleus.com";
$subject = "Testing the mail function";
$message = "Hello! This is the body of the message. ";
$extra = "From: kris@phpworld.com Reply-To: karn@nucleus.com ";
mail ($recipient, $subject, $message, $extra);
echo "Sending mail...";
echo "";
?>
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 (' ').
Here we will show the full capabilities of the PHP mail function.
PHP Code:
echo "";
$recipient = "Kris Arndt
$subject = "Testing the mail function";
$message = "Hello! This is the body of the message. ";
$extra = "From: kris@phpworld.com Reply-To: karn@nucleus.com ";
mail ($recipient, $subject, $message, $extra);
echo "Sending mail...";
echo "";
?>
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 (' ').
-
上一个: 中文php.ini上
相关文章
- php中telnet命令发送邮件演示 11-09
- PHP利用Jmail组件实现发送邮件 02-26
- PHP中常用的发送邮件方法 11-27
- 推荐一个php发送有附件的电子邮件插件 11-03
- 利用php mail()进行邮件发送实现方法 05-10
- php socket 使用smtp服务器发送邮件 02-23