I have this code:
<?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 = "[email protected]";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?>
In my table ("email") I have multiple addresses.
(They are not comma sepparated.)
How could I send my message to all of those addresses?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…