summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-17 09:22:03 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-17 09:22:03 +0000
commit23be8a14216d427554bbb71dc19c7977c44863b7 (patch)
treee36f27a4129bf2e2a864b897807d23ef077cfeef /roundcubemail/program/include
parent9e975e7a7c471fb3f5c7d5c531e47eb950899297 (diff)
- PEAR::Net_SMTP 1.5.2, fixed timeout issue (#1487843)
git-svn-id: https://svn.roundcube.net/trunk@4665 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_smtp.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_smtp.php b/roundcubemail/program/include/rcube_smtp.php
index 654c7ef86..120336c49 100644
--- a/roundcubemail/program/include/rcube_smtp.php
+++ b/roundcubemail/program/include/rcube_smtp.php
@@ -105,7 +105,7 @@ class rcube_smtp
$this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host);
- if($RCMAIL->config->get('smtp_debug'))
+ if ($RCMAIL->config->get('smtp_debug'))
$this->conn->setDebug(true, array($this, 'debug_handler'));
// try to connect to server and exit on failure
@@ -118,6 +118,13 @@ class rcube_smtp
return false;
}
+ // workaround for timeout bug in Net_SMTP 1.5.[0-1] (#1487843)
+ if (method_exists($this->conn, 'setTimeout')
+ && ($timeout = ini_get('default_socket_timeout'))
+ ) {
+ $this->conn->setTimeout($timeout);
+ }
+
$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'];