最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
网上找到的两个PHP发送邮件的例子,很不错,贴出来给初学者参考吧(不知道是否有兄弟曾贴过),呵呵(2
时间:2022-07-02 10:34:16 编辑:袖梨 来源:一聚教程网
Advanced Example
Here we will show the full capabilities of the PHP mail function.
PHP Code:
echo "";
$recipient = "Kris Arndt,[email protected]";
$subject = "Testing the mail function";
$message = "Hello! This is the body of the message. ";
$extra = "From: [email protected] Reply-To: [email protected] ";
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: [email protected] Reply-To: [email protected] ";
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 (' ').
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21