summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-04-01 22:51:23 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-01 22:51:23 +0200
commit82d1ea240e674e682e0cae7aa428e9543e082ba8 (patch)
tree2c4e5625d03bbfb4768038316081d2d038ea3b30 /lib
parentd811026ec9008331049726d6b26a76913df95f82 (diff)
parent83b4bcfdbf832f1ebc78c9cf6f6aba5490b65cb3 (diff)
downloadnextcloud-server-82d1ea240e674e682e0cae7aa428e9543e082ba8.tar.gz
nextcloud-server-82d1ea240e674e682e0cae7aa428e9543e082ba8.zip
Merge pull request #7884 from owncloud/use-idn_to_ascii-if-available
idn_to_ascii is only used if available
Diffstat (limited to 'lib')
-rw-r--r--lib/private/mail.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/mail.php b/lib/private/mail.php
index 79f51609631..f9083cc4e64 100644
--- a/lib/private/mail.php
+++ b/lib/private/mail.php
@@ -137,6 +137,9 @@ class OC_Mail {
* @return string
*/
public static function buildAsciiEmail($emailAddress) {
+ if (!function_exists('idn_to_ascii')) {
+ return $emailAddress;
+ }
list($name, $domain) = explode('@', $emailAddress, 2);
$domain = idn_to_ascii($domain);