[snip]
        while($row = mysql_fetch_array($result1))
          {
        $headers .= "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        $headers .= "From: Website <emailaddress>\r\n";
        $headers .= "To: $row[email_address]\r\n";
        $headers .= "X-Priority: 1\r\n";
        $headers .= "X-MSMail-Priority: Normal\r\n";
        $headers .= "X-Mailer: MyWebsite";
        $subject = "$subject";
        $message = "<html><head><title>aaa</title></head><body
bgcolor=ffffff>aaa</body></html>";

       mail($to, $subject, $message, $headers)
        or print "Could not send mail to customer";
    
        print "<br><font size=1><font color=cccccc>mail sent to
</font><b>$row[email_address]</b>";
}
[/snip]

At first glance .... $to is undefined. When testing set
error_reporting(E_ALL); to catch these kinds of things. Is it possible
that you define $to as your e-mail address somewhere else and each time
the thing loops it sends you a copy?


Have a pleasant, productive and prosperous day.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to