Friday, May 4

More PEAR Mail Tidbits

Yep, still playing with it. I'm sending emails to people who've decided they want to receive updates from the organization. I did like:

$query = mysql_query("SELECT email FROM info WHERE rcv_updates = 'yes'");
while($row = mysql_fetch_assoc($query)){
$headers['bcc'] .= $row['email'].",";
$recipients .= $row['email'].",";
}
Then all the regular stuff. It was kind of a shot in the dark for me, Not quite sure if it would work. Well, it did. The cool thing was since I didn't specify a To and only bcc's, the To field in the email I got was "undisclosed-recipients:;"

neat

No comments: