-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Symfony version(s) affected
5.3
Description
Symfony Mailer converts the email addresses domain to A-label in order to be compliant with servers that does not support the SMTPUTF8 flag but this conversion is not fully IDNA2008 compliant.
See #44091 that is the equivalent report for HttpClient.
This line should be fixed.
How to reproduce
$stream = new SocketStream();
$stream
->setHost($host)
->setPort($port)
->disableTls();
$transport = new SmtpTransport($stream);
$mailer = new Mailer($transport);
$email = (new Email())
->from($from)
->to($to)
->subject($subject)
->text($body);
$mailer->send($email);
If $to
domain is fußball.test it should be converted to xn--fuball-cta.test instead of fussball.test.
Possible Solution
The following flags should be provided to be the most compliant possible with IDNA 2008:
IDNA_DEFAULT | IDNA_USE_STD3_RULES | IDNA_CHECK_BIDI | IDNA_CHECK_CONTEXTJ | IDNA_NONTRANSITIONAL_TO_ASCII
Additional Context
No response