lional Posted February 27, 2006 Share Posted February 27, 2006 I would like to have a script where I can pull email addresses from a mysql table, and then either select all of the email addresses or selected email addresses and send a message to them all simultaneouslyAny idea where I can get info on such a scriptRegardsLional Quote Link to comment https://forums.phpfreaks.com/topic/3690-bulk-mail-script/ Share on other sites More sharing options...
DeathStar Posted March 23, 2007 Share Posted March 23, 2007 Use this script:[code]<?php session_start(); include "connect"; if($_POST['mes']) { $ax=mysql_query("SELECT * FROM users",$c); while($r=mysql_fetch_array($ax)) { $to=$r['email']; $subj = "News from YourSite"; $mess =$_POST['mes']; $headers ="From: noreply@yoursite.com "; mail($to,$subj,$mess,$headers); } print "Newsletter sent to ".mysql_num_rows($ax)." Users"; } else { print "Send Newsletter to everyone!!.<br /> <form action='nletter.php' method='post'> <textarea cols=30 rows=15 name='mes'> </textarea> <input type='submit' value='Send!'></form>"; } ?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/3690-bulk-mail-script/#findComment-213844 Share on other sites More sharing options...
backlund Posted May 18, 2007 Share Posted May 18, 2007 Is there a way to do something like this, on scheduled time/days? I have an event calendar that I would like to be able to email all registered users reminders of the events automatically. This script takes care of the bulk mailing, but is there a way to schedule it? Quote Link to comment https://forums.phpfreaks.com/topic/3690-bulk-mail-script/#findComment-256671 Share on other sites More sharing options...
hitman6003 Posted May 18, 2007 Share Posted May 18, 2007 linux cron jobs or windows scheduled tasks... Quote Link to comment https://forums.phpfreaks.com/topic/3690-bulk-mail-script/#findComment-256673 Share on other sites More sharing options...
backlund Posted May 18, 2007 Share Posted May 18, 2007 Are either of these possible with non dedicated hosting? Quote Link to comment https://forums.phpfreaks.com/topic/3690-bulk-mail-script/#findComment-256718 Share on other sites More sharing options...
hitman6003 Posted May 18, 2007 Share Posted May 18, 2007 Depends on your host...you'll have to ask them Quote Link to comment https://forums.phpfreaks.com/topic/3690-bulk-mail-script/#findComment-256724 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.