NEED HELP - Mailing List

From: Date: Thu, 07 Sep 2000 04:22:48 +0000
Subject: NEED HELP - Mailing List
Groups: php.general 
Request: Send a blank email to php-general+get-15658@lists.php.net to get a copy of this message
I've been breaking my head on this so I finally decided to ask for help. I am writting a script that will pull all email addresses in our db, then individually send them an email using a form. Basically it's a mass mail. Below is the code that I am working with, but it does not seem to be working. Can anybody share some light on this one? // sql query looks like this: $primary_query = "SELECT email,firstname,lastname FROM users"; $primary_result = mysql_query($primary_query,$link); // then here is my head breaker <? while($primary_row = mysql_fetch_array($primary_result)): $message_mail .= "$primary_row[firstname] $primary_row[lastname],\n\n"; $message_mail .= "$message"; mail("$primary_row[email]", "$subject", "$message_mail", "From:$from_email\n\n"); echo "Emailed: $primary_row[email]<BR>"; endwhile; ?>

« previous php.general (#15658) next »