Jump to content


Photo

Bulk Mail script


  • Please log in to reply
5 replies to this topic

#1 lional

lional
  • Members
  • PipPipPip
  • Advanced Member
  • 266 posts

Posted 27 February 2006 - 05:32 PM

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 simultaneously

Any idea where I can get info on such a script

Regards

Lional

#2 DeathStar

DeathStar
  • Members
  • PipPipPip
  • Advanced Member
  • 529 posts
  • LocationHere, there, everywhere...

Posted 23 March 2007 - 09:29 PM

Use this script:
<?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>"; 
} 
?>

PHP and MySQL Programmer.
SQL = array('MySQL', 'PostgreSQL', 'Oracle', 'mSQL', 'Microsoft SQL');

#3 backlund

backlund
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 May 2007 - 10:15 PM

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?

#4 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 18 May 2007 - 10:16 PM

linux cron jobs or windows scheduled tasks...

#5 backlund

backlund
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 May 2007 - 11:27 PM

Are either of these possible with non dedicated hosting?

#6 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 18 May 2007 - 11:53 PM

Depends on your host...you'll have to ask them




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users