Re: [PHP] Email to database

2003-09-05 Thread Enda Nagle
Its working ok now ­ I changed the error in the headers, but I had added in another BCC item which was causing the repeated emails. Working great now Jay ­ thanks a mil for your help! Regards Enda -- On 9/5/03 2:59 PM, "Jay Blanchard" <[EMAIL PROTECTED]> wrote: > [snip] > email1 - gets a copy

RE: [PHP] Email to database

2003-09-05 Thread Jay Blanchard
[snip] email1 - gets a copy of each message email2 - gets his message and the one for email3 email3 - gets his own message [/snip] Did you change that header line as recommended? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Email to database

2003-09-05 Thread Enda Nagle
Jay, The $to variable is [EMAIL PROTECTED] Then the emails are pulled from the database in the following order: email1, email2, email3 The result is: [EMAIL PROTECTED] ­ gets a copy of each message (fine since its the $to address for each mail) email1 ­ gets a copy of each message email2 ­ gets h

RE: [PHP] Email to database

2003-09-05 Thread Jay Blanchard
[snip] Is there something like MoveNext I should use for the mail function? If I put the $headers in the while loop it just keeps adding to the $headers instead of sending each mail separately as I want it to. .. > while($row = mysql_fetch_array($result1)) > { > $head

Re: [PHP] Email to database

2003-09-05 Thread Enda Nagle
I¹ve defined $to earlier on ­ only thing is it still doesn¹t work correctly with the mail() function inside the while loop. The reason I wanted it in here was I¹m using the person¹s first name in the body of the mail. Should I just populate an array with the details of the users (first_name, email

Re: [PHP] Email to database

2003-09-05 Thread Marek Kilimajer
Enda Nagle wrote: mail($to, $subject, $message, $headers) or print "Could not send mail to customer"; print "mail sent to $row[email_address]"; Email was sent to $to, and not to $row[email_address] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

RE: [PHP] Email to database

2003-09-05 Thread Jay Blanchard
[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 \r\n"; $headers .= "To: $row[email_address]\r\n"; $headers .= "

[PHP] Email to database

2003-09-05 Thread Enda Nagle
Hi I am using a PHP / MySQL combination to send an email to all users in a table. When I run the script, say address1 in the resultset is [EMAIL PROTECTED], address2 is [EMAIL PROTECTED] & address3 is [EMAIL PROTECTED] ­ When I run the script, mail is sent to address1,address2 & address3. Problem