I have Installed Fresh Magento2.3 php version 7.2.12 . When System try to send any email like order,contact,register customer etc .. .
it will through Exception and not sending any email
main.CRITICAL: Deprecated Functionality: idn_to_ascii():
INTL_IDNA_VARIANT_2003 is deprecated in
/public_html/vendor/zendframework/zend-validator/src/EmailAddress.php
on line 560
error throw from here:
if (extension_loaded('intl')) {
if (defined('INTL_IDNA_VARIANT_UTS46')) {
return (idn_to_ascii($email, 0, INTL_IDNA_VARIANT_UTS46) ?: $email);
}
return (idn_to_ascii($email) ?: $email);
}
Best Answer
in magento: 2.3, php: 7.2 I got same error: Deprecated Functionality: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated ..
so I downgrade php version to 7.1 then its work. http://php.net/manual/en/migration72.deprecated.php
or another solution is to upgrade icu to ICU 4.6 http://www.linuxfromscratch.org/blfs/view/8.3/general/icu.html
to check icu current vesion
uconv -V
INTL_IDNA_VARIANT_2003 (integer) Use IDNA 2003 algorithm in idn_to_utf8() and idn_to_ascii(). This is the default. This constant and using the default has been deprecated as of PHP 7.2.0.
INTL_IDNA_VARIANT_UTS46 (integer) Use UTS #46 algorithm in idn_to_utf8() and idn_to_ascii(). Available as of ICU 4.6.