Hi there .. really new to this and can't see why this script isn't working. Any help gratefully accepted. I've done all the stuff I should do in php.ini re smtp server and the from address. It's not giving me any error messages, but it isn't sending emails either :-((
Kind regards
<?php
INCLUDE("login.inc"); //connects to database
$total = mysql_query("SELECT * FROM registration_bttest WHERE attended = 'Y'") ; //get the number of check-ins already made
$num_rows = mysql_num_rows($total);
echo "<font face='Arial, Helvetica, sans-serif' size='1'>Total number so far checked in: $num_rows</font>";
$query = "SELECT * FROM registration_bttest WHERE event = 'event5' AND attended = 'Y' "; //Query the database for delegates
$result = mysql_query($query);
$subject = "test message";
$message = "Please ignore";
while ($row = mysql_fetch_array($result))
{
extract($row) ;
mail($email, $subject, $message, "FROM: [email]registration@XXXXXXX.net[/email]" )
}
?>
Mail Sent!