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:[EMAIL PROTECTED]]
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";
> ?>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]