You should store all of the email adresses in a database, btw.
Anyway:
[tt]
<?php
$filename = "addresses.txt";
$fd = fopen ($filename, "r"
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
$addrs = split(",",$addresses);
for ($i=0; $i<count($addrs); $i++) {
mail($addrs[$i],"subject","body of the email"
}
?>
[/tt]
Assume that the addresses.txt text file that contains all of the addresses separated by comma's. Then, PHP opens the file, splits it up into an array, and then loops through the array, mailing the info that you want to each person.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.