hi, i'v been creating a flat file cms for a bit now and it stores users and password alows people to log in ect..
it's stored in a textfile like this
name password email@emai.com
and i have writen some code to send emails to eveyone who registerd.
PHP Code:
<? session_start();
$userlist = array();
$handle = fopen("../private/list.txt", 'rb');
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
$buffer = trim($buffer);
$userlist[] = $buffer;
}
fclose($handle);
}
foreach ($userlist as $line) {
$x = explode(' ', $line);
echo ("$x[2], ");
ini_set('sendmail_from',"paul@phppaul.rr7.co.uk");
$headers = "From: Me <me@me.rr7.co.uk>\r\n";
mail("$x[2], ", "Testing", "Just a simple test", $headers);
}
?>
Problem is that it dosent work, and thers no erros... most of the script is right it apears to be the part were the emails are sent that is going wrong.
|