RE: [PHP] sending email problems

From: Date: Mon, 19 Feb 2001 01:59:31 +0000
Subject: RE: [PHP] sending email problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40494@lists.php.net to get a copy of this message
The email address for the "To" part is taken from values saved within the session and that works fine .. just when i try to send to more than one email alais that it doesn't do.. -----Original Message----- From: James, Yz [mailto:liljim@btconnect.com] Sent: Monday, February 19, 2001 11:59 AM To: "Peter Houchin" Subject: Re: [PHP] sending email problems > Could some one please take a look at this and offer any suggestions as to > why i can't 1 send multiple "to" emails and also why i can't send to the > addesses in the "CC" part (i can't send to either single or multiple in CC) > This has got me baffled as to why i can't... > > Thanks in advance I'm still beginning with PHP / Perl, big time, but shouldn't you have a While loop wrapped around the mail(); (if selecting recipients from a database)? $sql = "SELECT email_address FROM users"; $result = @mysql_query($sql, $connection) or die ("Time for bed."); while($row = mysql_fetch_array($result)) { $address = $row['address']; mail("$address", "$subject", "$body.", "$headers \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); } I see from your email address you're in Oz. I am in the UK. And should be in bed... Work tomorrow. :) James. > $mailsend = mail("$address", "$subject", "$body.", "$headers \nContent-Type: > text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" ); > print ("$mailsend"); > echo "<font face=Helvetica, sans-serif size=3 color=#00499C>Email > Sent!</font>"; > include "incend.s"; > ?> >

« previous php.general (#40494) next »