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
parent
commit
70d42afb93
No known key found for this signature in database GPG Key ID: F941078878347C0C
  1. 2
      lib/private/Mail/Mailer.php
  2. 4
      lib/private/Mail/Message.php

2
lib/private/Mail/Mailer.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;
}

4
lib/private/Mail/Message.php

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

Loading…
Cancel
Save