Hi, I wanted to write an Newsletter script. So I created two tables in my Database. One is storing the Newsletters and one is Storing the bunch of folks who want to have them.
Everything works fine, I can write the Newsletter very easy in my selfwritten admin tool, but when I send the Newsletter only the first person in the list it getting this awfull Newsletter. Here is the script which sends out the Newsletter: if ($_REQUEST['action'] == 'send') { $Query = "SELECT * FROM newsletters_db WHERE id = '".$_REQUEST['id']."'"; $Result = mysql_query($Query, $connect); $arrResult = mysql_fetch_array($Result, MYSQL_ASSOC); $MailQuery = "SELECT * FROM newsletter_db"; $MailResult = mysql_query($MailQuery, $connect); $subject = $arrResult['head']; $message = $arrResult['text']; while ($arrMailResult = mysql_fetch_array($MailResult, MYSQL_ASSOC)) { mail($arrMailResult['address'], $subject, $message, "From: webmaster@$SERVER_NAME\r\n" ."Reply-To: info@$SERVER_NAME\r\n" ."X-Mailer: PHP/" . phpversion()) or die(mysql_error()); } echo '<p class="text01">Newsletter erfolgreich verschickt.</p>'; } Would be nice if i could get a hint =O) Sascha