Skip to content

Commit

Permalink
De 1078 bug with batch email sending for specific case taken from sla…
Browse files Browse the repository at this point in the history
…ck conversation (#867)

* Fix problem with sending batch email

```
Whenever we use Mailgun API to send emails, and when 'email to' address and 'Reply to' email address are the same, then the recipient variables are not being replaced with the actual values. I have cross checked this with the team and found that Mailgun API is not replacing the notation with actual values in this case.
```

* Fix problem with sending batch email

```
Whenever we use Mailgun API to send emails, and when 'email to' address and 'Reply to' email address are the same, then the recipient variables are not being replaced with the actual values. I have cross checked this with the team and found that Mailgun API is not replacing the notation with actual values in this case.
```

* test change

* test change
  • Loading branch information
oleksandr-mykhailenko committed Jul 19, 2023
1 parent 5039483 commit 181749e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
tools: composer-normalize

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log

The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
## 3.5.9
- Fixed: bug when params `to` and `reply-to` have the same address

## 3.5.6
- Changed: support bool value for method `createMultiple`

Expand Down
5 changes: 3 additions & 2 deletions src/Message/BatchMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ protected function addRecipient(string $headerName, string $address, array $vari
if (array_key_exists($headerName, $this->counters['recipients']) && !array_key_exists('id', $variables)) {
$variables['id'] = $headerName.'_'.$this->counters['recipients'][$headerName];
}

$this->batchRecipientAttributes[$address] = $variables;
if ($variables) {
$this->batchRecipientAttributes[$address] = $variables;
}

return $this;
}
Expand Down

0 comments on commit 181749e

Please sign in to comment.