Grazie, ora sto procedendo in questo modo:
Codice PHP:
<?php
include('config.php');
$oggetto = $_POST["oggetto"];
$messaggio = $_POST["messaggio"];
if($oggetto == '' || $messaggio == ''){
echo "Compila tutti i campi.";
exit;
}
else{
$headers = 'From: [email]webmaster@example.com[/email]' . "\r\n" .
'Reply-To: [email]webmaster@example.com[/email]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$sql = "SELECT Email FROM utenti";
$result = mysql_query($sql, $db) or die (mysql_error());
while ($row = mysql_fetch_row($result)) {
echo $row[0] . ', ';
}
mail($to, $oggetto, $messaggio, $headers);
}
?>
Sono riuscito a fare un elenco di tutte le email, però non so ora come poterle "integrare" nella funziona mail..