Re: smtp

From: Date: Tue, 21 May 2002 18:48:40 +0000
Subject: Re: smtp
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98634@lists.php.net to get a copy of this message
----- Original Message ----- From: "Steve Buehler" <steve@vespro.com> To: "PHP" <php-general@lists.php.net> 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 skb@sbcomp.net as the address. > > $send_params['recipients'] = array('skb@sbcomp.net'); // The recipients > (can be multiple) > $send_params['headers'] = array('From: "' . $mailer . '" <steve@vespro.com>', > 'To: skb@sbcomp.net' , '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...

« previous php.general (#98634) next »