In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Hi all. I really wish I could contribute here and help
> people out too but i don't know a fraction of the
> stuff that you gurus do. 
> I try not to bug you all with too many questions and
> try to figure it out/learn on my own as much as
> possible.
> 
> I am trying to figure out how i could send an email to
> everyone listed in a file. the file contains a name
> followed by a space followed by their email followed
> by a carriage return. the number of entries in the
> file changes. i would like to send the newletter to
> everyone in the file and have their name put in the
> email as well. (since i don't endorse spam I assure
> you this isn't for such purpose).
> 
> From what i'm able to figure out on my own, I think
> i'm going to need something that reads the file into
> some array which separates each entry based on the \n
> and the space and some sort of loop (for, while, etc).
> I have no idea how complex of a task this is but i
> would appreciate any help or ideas! thanks! (note: i'm
> on php4.0.4pl1)
> 

file() will read the file into an array; you could then use explode() on 
each element of the array to extract the email address, and mail() to 
send the message.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to