<?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);
?> 
手册里有的啊。

解决方案 »

  1.   

    哎呀,现在的娃!!!PHP参考手册都不看了。
      

  2.   

    sorry.... 手册看的,没想到这么容易的说…………
      

  3.   

    恐怕没有那么简单吧,你想到过如果对方用不同的邮箱接收到的效果吗?
    如果用一般的邮箱,如果用企业邮箱,如果用outlook接收,你能保证收到的邮件的格式吗?
    我确实是不会,我发过去经常收到的是带<br> <br/>等的,有的还不分行,随便从手册上考一段就去对付别人的问题..............有点草率吧