note 46271 added to function.mail
| From: | jochem at twisted dot nl | Date: | Tue, 05 Oct 2004 10:56:40 +0000 |
| Subject: | note 46271 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78016@lists.php.net to get a copy of this message | ||
hello, i have a question.
i have a newsletter which i want to send to my customers, by mail. the mail adresses are defined in
a mySQL database. i use the following script to load the correct settings:
<?
$sql = "SELECT * FROM email_db";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result) or die(mysql_error());
$ontvanger = $row["email"];
$onderwerp = "Laurentius Nieuwsbrief van " . $dd . "-" . $mm . "-" .
$jjjj;
$headers .= "From: " . $email . "\n";
$headers .= "X-Mailer: PHP 4.x\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/html; charset=us-ascii\n";
$inhoud = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\>"
<html>
<head>
...further code...
?>
the problem is that when i submit this form, all of my customers receive the same newsletter twice
instead of once.
Does anybody know the cause of this?
I've checked the PHP version;
checked on wrong quotes... nothing
kind regards,
Jochem
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46271
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46271&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46271&report=yes
Search -- http://master.php.net/manage/user-notes.php