I think the code is fine, 4 people have looke over it, and everybody says it look ok (even my ISP)
anyway here is the query and the loop
$Q = "SELECT DISTINCT mail from foo WHERE type = 1";
$Result = mysql_db_query("$db", $Q);
while ($adresser = @mysql_fetch_array($Result)){
$to = $adresser['mail'];
mail($to, "$Subjekt", "$html_stuff_start".stripslashes($body)."$html_stuff_end".$footer."", "$headers");
}
regards Thomas