sql_query($sql) or die("Error querying userinfo");
while ( $row = $db->sql_fetchrow($result) )
{
$email = $row['user_email'];
$name = $row['username'];
$pass = $row['user_newpasswd'];
eval("\$emailbody = \"$body\";");
mail($email, $subject, $emailbody, "From: $from");
print $email . " done...
";
flush();
}
print "
Process complete";
// clear the cleartext password from the database... do this only if you're sure the emails have been send
// $db->sql_query("UPDATE " . USERS_TABLE . " SET user_newpasswd = ''");
?>