diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-29 12:36:28 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-29 12:36:28 +0000 |
| commit | a1ab3314f33bb69b9f40dd700ea769bbeffc8a5d (patch) | |
| tree | b7ab2ad2ce8fd5ea4e237d916adaeb5d105ee3e7 /roundcubemail/program/include/rcube_smtp.php | |
| parent | e72c3403074be1e7664db46f8779b5f640318b3c (diff) | |
- Add Internationalized Domain Name (IDNA) support (#1483894)
git-svn-id: https://svn.roundcube.net/trunk@4009 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_smtp.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_smtp.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_smtp.php b/roundcubemail/program/include/rcube_smtp.php index 3c9f66977..b45747661 100644 --- a/roundcubemail/program/include/rcube_smtp.php +++ b/roundcubemail/program/include/rcube_smtp.php @@ -98,6 +98,9 @@ class rcube_smtp else $helo_host = 'localhost'; + // IDNA Support + $smtp_host = idn_to_ascii($smtp_host); + $this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host); if($RCMAIL->config->get('smtp_debug')) @@ -116,10 +119,14 @@ class rcube_smtp $smtp_user = str_replace('%u', $_SESSION['username'], $CONFIG['smtp_user']); $smtp_pass = str_replace('%p', $RCMAIL->decrypt($_SESSION['password']), $CONFIG['smtp_pass']); $smtp_auth_type = empty($CONFIG['smtp_auth_type']) ? NULL : $CONFIG['smtp_auth_type']; - + // attempt to authenticate to the SMTP server if ($smtp_user && $smtp_pass) { + // IDNA Support + if (strpos($smtp_user, '@')) + $smtp_user = idn_to_ascii($smtp_user); + $result = $this->conn->auth($smtp_user, $smtp_pass, $smtp_auth_type, $use_tls); if (PEAR::isError($result)) |
