RE: [PHP-DB] mail() ?

From: Date: Wed, 08 May 2002 17:02:25 +0000
Subject: RE: [PHP-DB] mail() ?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19049@lists.php.net to get a copy of this message
//get data $query = "SELECT name, email FROM userdb"; $mysql_result = mysql_query($query, $mysql_tacom_link); //standard for every mail $subject = "new offer " $headers .= "From: Birthday Reminder <xx@xx.comt>\n"; $headers .= "X-Sender: <xx@xx.com>\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "X-Priority: 1\n"; // Urgent message! $headers .= "Return-Path: <xx@xx.com>\n"; // Return path for errors //loop thro' results send mail to each person while($row = mysql_fetch_array($mysql_result)) { $message = "Hi $row["name"], new offer come and visit etc etc" $recipient .= "$row["name"] <$row["email"]>"; mail($recipient, $subject, $message, $headers); }// end while hth Peter ----------------------------------------------- Excellence in internet and open source software ----------------------------------------------- Sunmaia www.sunmaia.net info@sunmaia.net tel. 0121-242-1473 ----------------------------------------------- > -----Original Message----- > From: Dave Carrera [mailto:dave@davecarrera.com] > Sent: 08 May 2002 17:49 > To: php-db@lists.php.net > Subject: [PHP-DB] mail() ? > > > Hi All > > > > One of my customers has gathered email addresses via a web site I > designed an wishes to send an email announcing a special offer to all > these addresses. > > > > I know how to do them singularly, but my question is how can I make an > array ( I think.) from my mysql db containing these email addresses and > send each one the same email, one by one not cc or bcc. > > > > While I await your help and guidance in this issue I will be looking in > various manuals and php.net for mail() but I know this topic is hardly > covered in this kind of detail. > > > > As always you help, guidance, pointers or code examples are very much > appreciated. > > > > Thank you in advance. > > > > P.S; I was able to help someone with knowledge I gained from all of your > help today. It feels great to give back a bit when you can ;-) > > > > > > Dave Carrera > > Php Developer > > http://davecarrera.freelancers.net > > http://www.davecarrera.com > > > > > >

« previous php.db (#19049) next »