thanks for all this
what I really would like clarification on is;
I have 100+ email addresses in the array
if I keep the code
$sql = "SELECT Email FROM tblUser WHERE Level >= 3";
$result1 = mysql_query($sql)
or die(mysql_error());
while($row1 = mysql_fetch_array($result1))
$Email[] = $row1["Email"];
foreach($CEmail as $value)
{
mail ("$CEmail", "subject", "$body1");
}
will it send an e-mail to each of these addresses i.e. send 100+ e-mails rather than going down the route of sending one e-mail with 100+ addresses in the bcc field as suggested in this thread....
ALSO...
if I want to put variables in the body of the e-mail (like $username), can I make them specific to the e-maill address?
Can I use a query such as
$sql = "SELECT username FROM tblUser WHERE Email = $Email";
$result2 = mysql_query($sql)
or die(mysql_error());
while($row2 = mysql_fetch_array($result2))
$username = $row2["username"];
and if I specify
$body = " dear $username Blah Blah Blah";
would this put the correct user name in the body of the e-mail relating to each e-mail address
i.e. for the e-mail address abc@xyz.com the body of the e-mail would be Dear abc blah blah blah........
thanks