Jump to content

Bulk Mail script


lional

Recommended Posts

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
Link to comment
Share on other sites

  • 1 year later...
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]
Link to comment
Share on other sites

  • 1 month later...
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.