Codice PHP:
//seleziono le email a cui è associata la notifica di adesione "NotifyMe"
$sql = mysql_query("SELECT Email
FROM Profiles
WHERE PPNotify = 'NotifyMe'")
or die(mysql_error());
//recupero tutte le email e le includo in un array
while($row = mysql_fetch_object($sql)) {
$email[] = $row->Email;
}
//scrivo le email nel file "email.txt"
$fp = fopen('email.txt', 'a');
fwrite($fp, implode("\r\n", $email));
fclose($fp);
Il file "email.txt" dovrai prima crearlo. Per l'importazione in Outlook dovrebbe andar bene la semplice struttura riga per riga...