Browse Source

Merge tag 'hotfix_1695' into develop

hotfix_1695
feature/rotating_product
Guillaume Bourgeois 6 months ago
parent
commit
5a14ccc5a1
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      common/components/BulkMailer/BulkMailerBrevo.php

+ 5
- 5
common/components/BulkMailer/BulkMailerBrevo.php View File

'name' => $fromName, 'name' => $fromName,
'email' => $fromEmail 'email' => $fromEmail
], ],
'to' => [],
'bcc' => [],
'subject' => $subject, 'subject' => $subject,
'htmlContent' => $htmlContent 'htmlContent' => $htmlContent
] ; ] ;


foreach($contactsArray as $user) { foreach($contactsArray as $user) {
$data['to'][] = [
$data['bcc'][] = [
'name' => $userSolver->getUsernameFromArray($user), 'name' => $userSolver->getUsernameFromArray($user),
'email' => $user['email'] 'email' => $user['email']
]; ];


if(count($data['to']) == 50) {
if(count($data['bcc']) == 50) {
$this->requestPostEmailViaApi($client, $data); $this->requestPostEmailViaApi($client, $data);
$data['to'] = [] ;
$data['bcc'] = [] ;
} }
} }


if(count($data['to']) > 0) {
if(count($data['bcc']) > 0) {
$this->requestPostEmailViaApi($client, $data); $this->requestPostEmailViaApi($client, $data);
} }
} }

Loading…
Cancel
Save