rahjiggah Posted September 4, 2014 Share Posted September 4, 2014 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.