Jump to content

phpmailer and bcc groups of recipients...


rahjiggah

Recommended Posts

Hello,

 

I am sending an email via phpmailer to a large group of recipients.

 

I bcc'd the entire group which of course failed after the max limit was reached so I thought what about sending in chunks....

 

Im just trying to figure out how to loop through the groups of bcc's

 

basically Im thinking something like this...

$mail = new PHPMailer(true);
$mail->IsSMTP();
//setup from, replyto etc here...

//email query here to get emails in array $bccz..

//chunk results
$newArray = array_chunk($bccz, 50, false);

// Now process array_chunk()
$i = 0;
foreach ($newArray as $inner_array) {
    $i++;
        while (list($key, $value) = each($inner_array)) {
                     addBCC($value['email']);

}$subject = '=?UTF-8?B?'.base64_encode($cobig).'?=';
$mail->Subject = $subject;
$mail->IsHTML(true);

$mail->Body = $ermail;
$mail->Send();
}
$mail->clearBcc();
}

Just wondering if someone can tell me if this basic logic is right?

Link to comment
https://forums.phpfreaks.com/topic/290857-phpmailer-and-bcc-groups-of-recipients/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.