Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.