Hello guys!

If the checkbox is checked ($massmail) the users should send the mail to all of the email adresses in the database. I think I need to loop through the emails so that the email is not treated has spam, but how do I do this?

PHP Code:
'id' int(10NOT NULL auto_increment
'username' text NOT NULL
'password' text NOT NULL
'email' text NOT NULL
PHP Code:
<?php
require("config.php");
if (
$massmail == "on") {
mysql_connect($config['sql_host'], $config['sql_username'], $config['sql_password']); 
mysql_select_db($config['sql_database']); 
$sql mysql_query("SELECT id,username,email FROM members "); 
while (
$row=mysql_fetch_array($result)) { 
    
mail('".$row['email']."'"$topic""$message""From: $email");
    
mail"$email""$auto_subject""$auto_message""$headers");
} else {

    
mail("$mailbox""$topic""$message""From: $email");
    
mail"$email""$auto_subject""$auto_message""$headers");

    
header("location: $site_thanks");
}

php?>