RE: [PHP] Re: Sending an e-mail to 1,000 people
| From: | Ed Lazor | Date: | Sat, 02 Feb 2002 23:41:32 +0000 |
| Subject: | RE: [PHP] Re: Sending an e-mail to 1,000 people | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83268@lists.php.net to get a copy of this message | ||
At 06:25 PM 2/2/2002 -0500, Chris Cocuzzo wrote:
Godamnit. Shut-up about this already for godsakes and answer the original question!!LOL hehe good point Chris.
"Ben Clumeck" <bclumeck@home.com> wrote in message I would like to send an e-mail (the same e-mail) to 1,000 different people. I want each persons name to be in the "To:" field. Is there a way to customize it to where it can say Dear____ (having a different persons name corresponding to an e-mail address) so that it looks customized.Ben, how you approach this will depend on how you have the data stored. Let's assume two things: you have the e-mail addresses and names in a database and know how to retrieve and store them into the variables $email and $name. That said, create the body of your text: $body = " Dear $name, Here are recent developments on our web site... etc. "; Then use the mail function (http://www.php.net/manual/en/function.mail.php) to send the letter to the person like this: mail($email, "Site update", $body, "From: webmaster@atfantasy.com"); The next thing you'll probably start wondering is how to send fancy e-mail instead of those generic text based ones... PHPBuilder has an article you'll want to check out located here: http://www.phpbuilder.com/columns/kartic20000807.php3. -Ed