Skip to content

Commit

Permalink
Merge pull request #2701 from benwalch/patch-4
Browse files Browse the repository at this point in the history
Mail Processor: Fix adding recipient twice
  • Loading branch information
dpfaffenbauer authored Sep 7, 2024
2 parents 42a8d01 + f74e2cf commit 9fa3898
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/CoreShop/Component/Pimcore/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ public function addRecipients(array|string $recipients = null)
}
}

$document = $this->getDocument();

if ($document instanceof Email) {
//now add recipients from emailDocument, if given.
$storedRecipients = array_filter(explode(';', $document->getTo()));
foreach ($storedRecipients as $multiRecipient) {
$toRecipients[] = [$multiRecipient, ''];
}
}

foreach ($toRecipients as $recipient) {
$this->addTo($recipient[0], $recipient[1]);
}
Expand Down

0 comments on commit 9fa3898

Please sign in to comment.