Skip to content
This repository was archived by the owner on Nov 4, 2023. It is now read-only.

Commit f396629

Browse files
authored
Merge pull request #85 from PHORAX/feature/TYPO3v11-Fix-BCC-CC
[BUGFIX] Fix bcc/cc
2 parents c7754d0 + 6bf4fc5 commit f396629

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Classes/Mailer/TYPO3Mailer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ public function getReplyTo()
196196
{
197197
return $this->emailObj->getReplyTo();
198198
}
199-
200199
/* (non-PHPdoc)
201200
* @see Classes/Mailer/Tx_FormhandlerMailerInterface#getCc()
202201
*/
@@ -205,8 +204,8 @@ public function getCc()
205204
$ccArray = $this->emailObj->getCc();
206205
$ccConcat = [];
207206
if (is_array($ccArray)) {
208-
foreach ($ccArray as $email => $name) {
209-
$ccConcat[] = $name . ' <' . $email . '>';
207+
foreach ($ccArray as $cc) {
208+
$ccConcat[] = $cc->getName() . ' <' . $cc->getName() . '>';
210209
}
211210
}
212211
return $ccConcat;
@@ -217,11 +216,12 @@ public function getCc()
217216
*/
218217
public function getBcc()
219218
{
219+
220220
$bccArray = $this->emailObj->getBcc();
221221
$bccConcat = [];
222222
if (is_array($bccArray)) {
223-
foreach ($bccArray as $email => $name) {
224-
$bccConcat[] = $name . ' <' . $email . '>';
223+
foreach ($bccArray as $bcc) {
224+
$bccConcat[] = $bcc->getName() . ' <' . $bcc->getAddress() . '>';
225225
}
226226
}
227227
return $bccConcat;

0 commit comments

Comments
 (0)