This isnt working for some reason, and im not sure if you can email in loops like this......
Loop
$emailq=mysql_query("SELECT name,email FROM teams");
while(list($name,$email)=mysql_fetch_row($emailq)){
$email[toname] ="$name";
$email[toemail] ="$email";
$email[subject] ="$send[subject]";
$email[fromname] ="{$_SESSION['rights']}";
$email[fromemail] ="$config[sitemail]";
$email[replyname] ="$name";
$email[replyemail] ="$email";
$email[body] ="$send[body]";
email($email);
$sent.="Sending To $name..........Sent<br />";
}
Email Function
//E-Mail Function
function email($email){
mail("$email[toname] <$email[toemail]>","$email[subject]","$email[body]", "From: $email[fromname] <$email[fromemail]>\nReply-To: $email[replyname] <$email[replyemail]>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion());
}
No errors.