envexlabs Posted May 14, 2007 Share Posted May 14, 2007 Hey, I have a project coming up that requires stores to send out newsletters to people who have subscribed. The stores cannot see the emails of people who subscribed, so all they do is insert body text and hit send. Once all the emails are grabbed from the database is where i get stuck. I have NO clue where to start when it comes to sending out a mass email online. Does anyone have an idea of where to start? Thanks, envex Quote Link to comment https://forums.phpfreaks.com/topic/51355-a-bit-of-a-bind/ Share on other sites More sharing options...
chigley Posted May 14, 2007 Share Posted May 14, 2007 <?php $subject = $_POST['subject']; // From form $body = $_POST['message']; // Received from form $q = mysql_query("SELECT email FROM users WHERE receive_newsletter = 1"); while($row = mysql_fetch_assoc($q)) { $to = $row['email']; mail($to, $subject, $body); } ?> Not tested, and very basic but you get the idea Quote Link to comment https://forums.phpfreaks.com/topic/51355-a-bit-of-a-bind/#findComment-252898 Share on other sites More sharing options...
envexlabs Posted May 14, 2007 Author Share Posted May 14, 2007 Wow, that was fast and i didn't think it would be that simple. Thanks alot! Quote Link to comment https://forums.phpfreaks.com/topic/51355-a-bit-of-a-bind/#findComment-252900 Share on other sites More sharing options...
travelerBT Posted May 14, 2007 Share Posted May 14, 2007 check out PHPmailer... might be what you are looking for. Quote Link to comment https://forums.phpfreaks.com/topic/51355-a-bit-of-a-bind/#findComment-252902 Share on other sites More sharing options...
travelerBT Posted May 14, 2007 Share Posted May 14, 2007 phpmailer works better then mail... FYI Quote Link to comment https://forums.phpfreaks.com/topic/51355-a-bit-of-a-bind/#findComment-252904 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.