In my case, Magento 2.3 instance running on PHP 7.2, no changes/downgrade made in the php version.
Working for me after did the below changes into EmailAddress.php
file.
vendor/zendframework/zend-validator/src/EmailAddress.php on line 560
vendor/zendframework/zend-validator/src/EmailAddress.php on line 538
Function name idnToAscii
protected function idnToAscii($email)
{
if (extension_loaded('intl')) {
if (version_compare(phpversion(), '7.2', '>')) {
if (defined('INTL_IDNA_VARIANT_UTS46')) {
return (idn_to_ascii($email, 0, INTL_IDNA_VARIANT_UTS46) ?: $email);
}
}
return (idn_to_ascii($email) ?: $email);
}
return $email;
}
Function name idnToUtf8
protected function idnToUtf8($email)
{
if (extension_loaded('intl')) {
// The documentation does not clarify what kind of failure
// can happen in idn_to_utf8. One can assume if the source
// is not IDN encoded, it would fail, but it usually returns
// the source string in those cases.
// But not when the source string is long enough.
// Thus we default to source string ourselves.
if (version_compare(phpversion(), '7.2', '>')) {
if (defined('INTL_IDNA_VARIANT_UTS46')) {
return idn_to_utf8($email, 0, INTL_IDNA_VARIANT_UTS46) ?: $email;
}
return idn_to_utf8($email) ?: $email;
} else {
return idn_to_utf8($email) ?: $email;
}
return idn_to_utf8($email) ?: $email;
}
return $email;
}