Breaking: #110196 - PHP class Rfc822AddressesParser removed
See forge#110196
Description
The PHP class
\TYPO3\ has been
removed. The class was a modernized copy of the PEAR package
pear/mail
, dating back to 2010, and was only used internally by
\TYPO3\.
This internal usage is now based on
\Symfony\
of the
symfony/mime
package, which TYPO3 already utilizes for
sending emails.
Impact
Instantiating or referencing the class
Rfc822Addresses will raise
a fatal PHP error.
In addition,
Mail now strips surrounding
double quotes from display names: parsing
'"last, first" <email@example. previously returned the display
name
'"last, first"'
and now returns
'last, first'
. Quoting is
re-applied automatically by
symfony/mime
when composing a mail
message.
Affected installations
TYPO3 installations with third-party extensions directly using the class
Rfc822Addresses. The extension scanner reports any usage as a
strong match.
Migration
To parse a comma-separated list of email addresses with optional display
names, use
\TYPO3\,
which continues to work as before.
Alternatively, use the symfony/mime API directly to parse a single mailbox string:
use Symfony\Component\Mime\Address;
$address = Address::create('John Doe <john.doe@example.org>');
$email = $address->getAddress();
$name = $address->getName();