released Posted February 10, 2007 Share Posted February 10, 2007 I am developing a quick and easy mailing list emailer. Basically, I am posting the "From", "Subject" and "Message" variables from Flash, and querying MySQL for each of the emails, and setting the mail function on a loop like the following code; $from= $_POST['from']; $subject= $_POST['subject']; $body= $_POST['body']; $header= "From: ".$from; $query= "SELECT * FROM `mailing`"; $data= mysql_query($query); while($row= mysql_fetch_array($data)){ $to= $row['email']; mail($to, $subject, $body, $header); }; However, I will get multiple emails on the same account, and only one will contain the correct information. Also, I want to make sure that the loop doesn't stop if I get to an email that doesn't work anymore. Help will be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.