Re: how to send an email to everone listed in a file
| From: | David Robley | Date: | Wed, 10 Apr 2002 07:36:15 +0000 |
| Subject: | Re: how to send an email to everone listed in a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92350@lists.php.net to get a copy of this message | ||
In article <20020410034941.35035.qmail@web11703.mail.yahoo.com>,
policetrainee@yahoo.com 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