Re: Sending alots of mail
| From: | Tyler Longren | Date: | Thu, 16 Aug 2001 16:25:42 +0000 |
| Subject: | Re: Sending alots of mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63059@lists.php.net to get a copy of this message | ||
This was just discussed last week. Here's how:
$connection = mysql_connect("host","user","pass");
$db = mysql_select_db("db_name", $connection);
$sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
while ($row = mysql_fetch_array($sql)) {
$email = $row["email"];
$name = $row["name"];
// code to send email (use the mail() function)
}
Good luck,
Tyler Longren
Captain Jack Communications
tyler@captainjack.com
www.captainjack.com
On Thu, 16 Aug 2001 18:29:04 +0200
Jimmy Bäckström <broder_b@chello.se> wrote:
> Hi list!
> I'm about to write an application that takes about 5000 mailadresses
> from a database, and then sends a mail to each one of them. I haven't
> done this kind of apps before, so I don't know if it's a good idea. Does
> anyone have any suggestions?
>
> /Jimmy
>