provalo:
Codice PHP:
<?php
$user = "tuo user";
$psw = "tua password";
$host = "tuo Host";
$nome_db = "nome del DATA BASE";
$db = mysql_connect($host, $user, $psw);
$sql = " SELECT * from tua_tabella_delle_e_mail";
$result = mysql_query( $nome_db, $sql, $db) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
$email = "".$row["email"]."";
$to = $email;
$cc = "NON NECESSARIO";
$subject = "SOGGETTO della mail";
$message = "Ciao....................\n\r";
$message .= "Scrivi quello che vuoi o recupera questo campo........\r\n";
$from = "tua_mail@sito.pippa";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: " . $from . "\r\n";
$headers .= "CC: " .$cc . "\r\n";
$invio_conferma = mail($to, $subject, $message, $headers);
}
if ($invio_conferma)
{
echo("
E-mail inviate correttamente a:[b]$email[/b]
");
}else{
echo("NON FUNZIONA");
}
?>
facci sapere