mail problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi
i made a simple script to send e-mail to my mailing list
it reads the e-mails from a text file and send it to them
the problem that i want to send them once, not one by one which takes a lot
of time cause i have a limited quota per day
here is the script


<?php
$subject="subject";
$sendmessage="hi";
$from=mymail@mysite.com;
$fp = fopen("mails.txt", "r");
if (!$fp)
{
echo "<p><strong>can't Read emails."
."Please try again later.</strong></p></body></html>";
exit;
}
while (!feof($fp))
{
$mail= fgets($fp, 200);
mail($mail,$subject,$sendmessage,"From: $from");
echo $mail."<br>";
}
fclose($fp);
?>

can anyone help
and can i use a smtp server instead? and if yes please tell me how,
waiting for a reply
thanks for your time

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux