//...leggo i vari $_POST
$invia_EM="SELECT * FROM ".$tabella." WHERE invio='1' ORDER BY id";
$query_IN=mysql_query($invia_EM);
$num_EM=mysql_num_rows($query_IN);//verifica se ci sono indirizzi
if ($num_EM > 0){
while ($riga=mysql_fetch_array($query_IN)){
$email_A=$riga['email'];
$per_UNS=$per_UNS.$riga['id'];//da sistemare con a href...php?us=
$per_REM="<p style=\"font-size: 8px;\">per non ricevere più ns news rispondi scrivendo <b>REMOVE</b> o clic su:<br>
to not recieve our news just ansewer writing <b>REMOVE</b> or click on:
<a href=\"http://www.cat-web.eu/newsletter/rimuovi.php?uns=".$per_UNS.">remove</a></p>";
$testo=$testo.$per_REM;
$email_htm = "MIME-Version: 1.0\r\n";
$email_htm .= "Content-type: text/html; charset=iso-8859-1\r\n";
$email_htm .= "From: <".$email_da.">";
if (mail($email_A, $titolo, $testo, $email_htm))
{
sleep(1);
}else{
echo "errore di trasmissione";
}//fine if invia
}//fine while
}else{
echo "non ci sono indirizzi";
}//fine if indirizzi
mysql_close();
}// fine if invia