sending mail from DB (was :: Re: [thelist] simple PHP Mysql problem )
deboute benjamin
deboute at fr.clara.net
Tue Oct 3 20:12:58 CDT 2000
At 17:04 03/10/00 -0500, you wrote:
>Due to a change of address, we need to send an email to approximately
>500 email addressess. What is the best way to send these ?
$query="select concat('firstname', ' ', 'lastname') as name, email as email
from userinfo";
$res = mysql_db_result('external', $query, $conn);
$subject='our email';
$body='moved';
while(list($name, $email)=mysql_fetch_array($res)) {
mail('$name <$email>', $subject, $body, "From: info
<info@$SERVER_NAME>\nReply-To: info@$SERVER_NAME\n");
}
and please, change your subject when changing of subject.
ben.
More information about the thelist
mailing list