解决163/sohu/sina不能够收到PHP MAIL函数发出邮件的问题
<div class="codetitle"><a style="CURSOR: pointer" data="18572" class="copybut" id="copybut18572" onclick="doCopy('code18572')"> 代码如下:
<div class="codebody" id="code18572">
// multiple recipients
$to = 'aidan@example.com' . ','; // note the comma
$to .= 'wez@example.com';
// subject
$subject = 'Birthday Reminders for August';
// message
$message = '
Birthday Reminders for August Here are the birthdays upcoming in August!
<table>
<tr>
Person | Day | Month | Year | </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>
';
// 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
mary@example.com,Kelly
kelly@example.com' . "\r\n";
$headers .= 'From: Birthday Reminder
birthday@example.com' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
// Mail it
mail($to,$subject,$message,$headers);