----- Original Message -----
From: "Steve Buehler" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 2:34 PM
Subject: [PHP] smtp
> I am trying to use the "smtp class" from phpguru.org with a mysql database
> using PHP. My question is this. I understand that I can send out email
to
> multiple email addresses using this class. How can I populate these
arrays
> with the email addresses. The fields that would have all of the addresses
> in them would be the ones that have [EMAIL PROTECTED] as the address.
>
> $send_params['recipients'] = array('[EMAIL PROTECTED]'); // The recipients
> (can be multiple)
> $send_params['headers'] = array('From: "' . $mailer . '"
<[EMAIL PROTECTED]>',
> 'To: [EMAIL PROTECTED]' , 'Subject: ' . $mail_subject
> );
> I figure that I would be using a while loop like the following:
> while($query_data = mysql_fetch_row($result)) {
> $row=mysql_fetch_object($result);
> // This is where I would use something to add $row->email to the arrays.
> }
while($row = mysql_fetch_object($result))
{ $send_params['recipients'][] = $row->email; }
I just noticed in your code that you call fetch_row and
fetch_object...that's going to mess up things. just call one or the other.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php