I am setting up some email sending with PHP pulling info from MySQL.
I have one question on how to make the message body.
Here is the code I have.
What is the key to getting the PHP loop to be equal to a value.
Code: Select all
$ToMail = 'xyz@xyz.com';
$MsgSubject = "hello all";
$MsgBody = (
echo "<table>";
while($row589 = mysql_fetch_array($sql589)) {
echo "<tr>";
echo "<td>".$row589['name']."</td>";
echo "<td>".$row589['address']."</td>";
echo "<td>".$row589['bod']."</td>";
echo "<td>".$row589['phone']."</td>";
echo "</tr>";
}
echo "</table>"
);