PHP 邮件:多个收件人?
我有这个代码:
<?php
include("db.php");
$result = mysql_query("SELECT * FROM email");
while($row = mysql_fetch_array($result))
{
$to = $row['address'];
}
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "example@example.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?>
在我的表格(“电子邮件”)中,我有多个地址。(它们不是逗号分隔的。如何将邮件发送到所有这些地址?