# emailer

**URL:** <https://www.phphelp.com/t/emailer/9122>\
**Category:** General PHP Help\
**Created:** [June 10, 2004, 4:07pm UTC](https://www.phphelp.com/t/emailer/9122 "2004-06-10T16:07:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mavoric](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@mavoric](https://www.phphelp.com/u/mavoric)\
**Post date:** [June 10, 2004, 4:07pm UTC](https://www.phphelp.com/t/emailer/9122/1 "2004-06-10T16:07:25Z")

</div>

currently i have a script that emails a set of email address stored in a text file, i.e.

```auto
 me@me.com, fred@me.com, something@me.com
```

how do i make this send the emails to them without them seeing who else is there, currently this is the email

[php]mail( $email, “Thought Of The Day”,  
$message, “From: [noreply@me.com](mailto:noreply@me.com)” );[/php]

(and the variable $email has all the email address stored in the same way as above

Thanks

---

<div class="post-metadata">

**Author:** ![Pablo](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/ad7895/32.png) [@Pablo](https://www.phphelp.com/u/Pablo)\
**Post date:** [June 10, 2004, 4:37pm UTC](https://www.phphelp.com/t/emailer/9122/2 "2004-06-10T16:37:33Z")

</div>

You should put the file in an array and then just make email = the variable +1 and loop that till the end of file “feof”.  
Heres something that might help you.

[php]  
$file = “./users.txt”;  
$fp = fopen("$file", “a+”);  
while (!feof($fp)) $content .= fgetc($fp);  
$content = $content;  
// explode " " = spaces u can change it to “, " if u like  
$stats2 = explode(” ", $content);  
while (list($index, $stat) = each ($stats2));  
$num2 = 9999;  
for ($o = 0; $o \< $num2; $o++) {  
$email = $stats2[$o]  
// email code here  
}  
[/php]
