Codice PHP:
$host="";
$user="";
$pwd="";
$lista=""; //questo è giusto senza niente tra le virgolette
$link=mysql_connect($host,$user,$pwd) or die("Non riesco a connettermi");
mysql_select_db ("");
$mailinglist_query=mysql_query("SELECT mail FROM utenti",$link) or die ("Mysql dice: " . mysql_error());
while ($row = mysql_fetch_array($mailinglist)) {
$lista.=$row[mail];
$lista.=", ";
}
$to = "\"$lista\"";
Comunque faresti meglio a mandare non con il "to" ma con il CCN oppure mandare mail separate ad ogni utente, perchè non è bello che ogni utente veda le email di tutti gli altri...
ciao