Skip to content

Commit 4eb8594

Browse files
committed
MC-41497: [Contact us] Invalid header value detected error when French characters such as "é", "è" on the email address
1 parent 1f178e9 commit 4eb8594

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Mail/AddressConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function convertEmailUserToAscii(string $email): string
6060
if (preg_match('/^(.+)@([^@]+)$/', $email, $matches)) {
6161
$user = $matches[1];
6262
$hostname = $matches[2];
63-
$userEncoded = idn_to_ascii($user);
63+
$userEncoded = idn_to_ascii($user, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
6464
if ($userEncoded == $user) {
6565
return $email;
6666
}

0 commit comments

Comments
 (0)