I have the below code. I usually send an email to one recipient. My question is how can I modify for it to send to multiple recipients that are in my database.
Suppose I have a table called "tblemails" and a column called "email".
Note:
I also dont want to show all address to each member of my list (something like using Bcc).
Please Help?
<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "sender@gmail.com";
$to = "receiver@gmail.com";
$subject = "Online order";
$message = "You just ordered";
$headers = "From:" . $from;
mail($to,$subject,$message, $headers);
?>