Browse Source
Use non-deprecated INTL_IDNA_VARIANT_UTS46
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
pull/5791/head
Lukas Reschke
8 years ago
committed by
Roeland Jago Douma
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with
3 additions and
3 deletions
-
lib/private/Mail/Mailer.php
-
lib/private/Mail/Message.php
|
|
|
@ -170,7 +170,7 @@ class Mailer implements IMailer { |
|
|
|
} |
|
|
|
|
|
|
|
list($name, $domain) = explode('@', $email, 2); |
|
|
|
$domain = idn_to_ascii($domain); |
|
|
|
$domain = idn_to_ascii($domain, 0,INTL_IDNA_VARIANT_UTS46); |
|
|
|
return $name.'@'.$domain; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -58,11 +58,11 @@ class Message { |
|
|
|
foreach($addresses as $email => $readableName) { |
|
|
|
if(!is_numeric($email)) { |
|
|
|
list($name, $domain) = explode('@', $email, 2); |
|
|
|
$domain = idn_to_ascii($domain); |
|
|
|
$domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46); |
|
|
|
$convertedAddresses[$name.'@'.$domain] = $readableName; |
|
|
|
} else { |
|
|
|
list($name, $domain) = explode('@', $readableName, 2); |
|
|
|
$domain = idn_to_ascii($domain); |
|
|
|
$domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46); |
|
|
|
$convertedAddresses[$email] = $name.'@'.$domain; |
|
|
|
} |
|
|
|
} |
|
|
|
|