Location: PHPKode > scripts > FreeCast > sender.php
<?php
##### Variables to be changed by the user #####
$host="localhost";
$user="root";
$pass="pass";
$dbase="freecast";
$limit=10;
##### end of variables to be changed by the user #####

function send_mail($from,$to,$subject,$message,$ctype='text/html')
{
   $mail_mime .= "MIME-Version: 1.0\n";
   $mail_mime .= "Content-Type: $ctype;\n"; 
   $texte .=$message;
   
   if(!mail($to, $subject, $texte,"Reply-to: $from\nFrom: $from\n".$mail_mime)) echo ("Cannot send mail.");
}

$q="SELECT * FROM hywd_smails ORDER BY id LIMIT $limit";
$res=mysql_query($q);

while($mail=mysql_fetch_array($res))
{	
   send_mail($mail[sender],$mail[receiver],$mail[subject],$mail[message]);	
   
   $q="DELETE FROM hywd_smails WHERE id='$mail[id]'";
   mysql_query($q);
}

?>
Return current item: FreeCast