Bug #88702

EmailFinisher - Recipients - Cannot unpack array with string keys

Added by Joerg Boesche 11 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2019-07-08
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

The EmailFinisher throws an exception with the message "*Cannot unpack array with string keys*" if the recipient list has a "Human-readable name of the sender" and an "Email address of the sender (Default: "{email}")".

Affected class: \TYPO3\CMS\Form\Domain\Finishers\EmailFinisher
Method: executeInternal
Input-Variable $recipients:

$recipients = [
 'foo@bar.com => 'Foo Bar'
];

...
        $mail->from(new NamedAddress($senderAddress, $senderName))
            ->to(...$recipients)
            ->subject($subject);
...

t3-ext-form-recipients-config.png View (33.6 KB) Joerg Boesche, 2019-07-08 13:57


Related issues

Related to TYPO3 Core - Feature #88643: Replace SwiftMailer with Symfony/Mailer Closed 2019-07-05
Related to TYPO3 Core - Bug #89083: MailMessage setFrom and setTo are throwing exceptions Closed 2019-09-04

Associated revisions

Revision 7d5d3784 (diff)
Added by Susanne Moog 11 months ago

[BUGFIX] Adjust EmailFinisher to new recipient style

With the symfony mail component recipient addresses should be
instantiated and used as either `Address` or `NamedAddress` object
instead of an associative array. The patch introduces usage of both.

Resolves: #88702
Releases: master
Change-Id: Ie592d93c6cc191da873478e59830900a66ea9aeb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61237
Tested-by: Benjamin Franzke <>
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benjamin Franzke <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Joerg Boesche 11 months ago

Sorry, ... wrong labels ..

The right label in the T3 backend is: "Email addresses and human-readable names of the recipients" (Email Address, Name).

#2 Updated by Susanne Moog 11 months ago

  • Related to Feature #88643: Replace SwiftMailer with Symfony/Mailer added

#3 Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61237

#4 Updated by Gerrit Code Review 11 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61237

#5 Updated by Anonymous 11 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Frank Naegler 8 months ago

  • Related to Bug #89083: MailMessage setFrom and setTo are throwing exceptions added

#7 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF