Use non-deprecated INTL_IDNA_VARIANT_UTS46

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2017-08-04 18:06:17 +02:00 committed by Roeland Jago Douma
parent c78e999b21
commit 70d42afb93
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}
}