|
|
@@ -17,24 +17,24 @@ class BulkMailerBrevo implements BulkMailerInterface |
|
|
|
'name' => $fromName, |
|
|
|
'email' => $fromEmail |
|
|
|
], |
|
|
|
'to' => [], |
|
|
|
'bcc' => [], |
|
|
|
'subject' => $subject, |
|
|
|
'htmlContent' => $htmlContent |
|
|
|
] ; |
|
|
|
|
|
|
|
foreach($contactsArray as $user) { |
|
|
|
$data['to'][] = [ |
|
|
|
$data['bcc'][] = [ |
|
|
|
'name' => $userSolver->getUsernameFromArray($user), |
|
|
|
'email' => $user['email'] |
|
|
|
]; |
|
|
|
|
|
|
|
if(count($data['to']) == 50) { |
|
|
|
if(count($data['bcc']) == 50) { |
|
|
|
$this->requestPostEmailViaApi($client, $data); |
|
|
|
$data['to'] = [] ; |
|
|
|
$data['bcc'] = [] ; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(count($data['to']) > 0) { |
|
|
|
if(count($data['bcc']) > 0) { |
|
|
|
$this->requestPostEmailViaApi($client, $data); |
|
|
|
} |
|
|
|
} |