Project

General

Profile

Actions

Bug #89379

closed

Emails sending doesn't work using MailMessage

Added by Pixelant Developer over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-10-09
Due date:
% Done:

0%

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

Description

Get en exception when trying to send an email in TYPO3 v10.1 and symfony/mailer v4.3.5

(1/1) Symfony\Component\Mime\Exception\InvalidArgumentException
An address can be an instance of Address or a string ("array") given).

in /var/www/typo3_10_dev/vendor/symfony/mime/Address.php line 81

Code example:

$mail = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);

        $mail->setSubject('Your subject');
        $mail->setFrom(array('john@doe.com' => 'John Doe'));
        $mail->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name'));
        $mail->setBody('Here is the message itself');
        $mail->send();

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89083: MailMessage setFrom and setTo are throwing exceptionsClosedFrank Nägler2019-09-04

Actions
Actions

Also available in: Atom PDF