View Single Post
  #1 (permalink)  
Old 30-12-2007, 15:19
borninblood's Avatar
borninblood borninblood is offline
Premium Member
 
Join Date: May 2007
Posts: 106
Default Sending Email in PHP

Does anyone know a good method of sending emails en mass that are going to email addresses taken from a database.

Currently I use a rather poor method -

PHP Code:
while($row=mysql_fetch_array($result))
{
$to "$row[email]";
$subject "Title";
$body "Body Content";
$headers "From: webmaster@borninblood.co.uk\r\n" .
    
"X-Mailer: php";
if (
mail($to$subject$body$headers)) {
  echo(
"<p>Message sent!</p>");
 } else {
  echo(
"<p>Message delivery failed...</p>");
 }
}

But what happens when I run is the site goes into 403 meltdown assumedly because the server assumes this is a security breech.

Any advice would be greatly appreciated.
__________________
BornInBlood (Metal) || SimplyTied (Bondage)
Reply With Quote