Merge pull request #9095 from JaredBoone/bugfix/8387

Do not convert email addresses with idn_to_ascii if…
This commit is contained in:
Morris Jobke 2018-04-06 11:44:51 +02:00 committed by GitHub
commit b9ca121671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,7 @@ class Mailer implements IMailer {
* @return string Converted mail address if `idn_to_ascii` exists * @return string Converted mail address if `idn_to_ascii` exists
*/ */
protected function convertEmail($email) { protected function convertEmail($email) {
if (!function_exists('idn_to_ascii') || strpos($email, '@') === false) { if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46') || strpos($email, '@') === false) {
return $email; return $email;
} }

View File

@ -65,7 +65,7 @@ class Message implements IMessage {
* @return array Converted addresses if `idn_to_ascii` exists * @return array Converted addresses if `idn_to_ascii` exists
*/ */
protected function convertAddresses($addresses) { protected function convertAddresses($addresses) {
if (!function_exists('idn_to_ascii')) { if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46')) {
return $addresses; return $addresses;
} }