<?php
// multiple recipients
$to = '[email protected]' . ', '; // note the comma
$to .= '[email protected]';// subject
$subject = 'Birthday Reminders for August';// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers
$headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
$headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$headers .= 'Bcc: [email protected]' . "\r\n";// Mail it
mail($to, $subject, $message, $headers);
?>
手册里有的啊。
// multiple recipients
$to = '[email protected]' . ', '; // note the comma
$to .= '[email protected]';// subject
$subject = 'Birthday Reminders for August';// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers
$headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
$headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$headers .= 'Bcc: [email protected]' . "\r\n";// Mail it
mail($to, $subject, $message, $headers);
?>
手册里有的啊。
解决方案 »
- cakephp 内部错误 问题请教
- php有没有通配符?
- PHP 调用Java Webservice 参数问题 特难,希望高手进来看看
- 网站换了台服务器验证码显示不了,GD库开启了,在线求解决方案
- 关于session,浏览器,php。。。。。。。。。。
- 为什么我的php还不显示错误信息?已经打开了错误提示了呀
- 循环table里面的<tr>
- PHP5.2.2的file_exists函数,救命啊
- 上传文件的时候怎样同时上传其它文本域??
- 请问如何使EREG函数可以查询指定的中文?
- 男儿膝下有黄金,恕在下不能跪求,急需对ibf论坛有研究的大侠们帮助,ibf论坛是否也有bug?
- 关于PHP画面显示的问题。
如果用一般的邮箱,如果用企业邮箱,如果用outlook接收,你能保证收到的邮件的格式吗?
我确实是不会,我发过去经常收到的是带<br> <br/>等的,有的还不分行,随便从手册上考一段就去对付别人的问题..............有点草率吧