Merge branch 'master' of github.com:roundcube/roundcubemail
| | |
| | | // IMAP |
| | | // ---------------------------------- |
| | | |
| | | // the mail host chosen to perform the log-in |
| | | // leave blank to show a textbox at login, give a list of hosts |
| | | // The mail host chosen to perform the log-in. |
| | | // Leave blank to show a textbox at login, give a list of hosts |
| | | // to display a pulldown menu or set one host as string. |
| | | // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// |
| | | // Supported replacement variables: |
| | |
| | | // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) |
| | | // %s - domain name after the '@' from e-mail address provided at login screen |
| | | // For example %n = mail.domain.tld, %t = domain.tld |
| | | // WARNING: After hostname change update of mail_host column in users table is |
| | | // required to match old user data records with the new host. |
| | | $rcmail_config['default_host'] = ''; |
| | | |
| | | // TCP port used for IMAP connections |
| | |
| | | $this->fp = @fsockopen($host, $this->prefs['port'], $errno, $errstr, $this->prefs['timeout']); |
| | | |
| | | if (!$this->fp) { |
| | | if (!$errstr) { |
| | | $errstr = "Unknown reason (fsockopen() function disabled?)"; |
| | | } |
| | | $this->setError(self::ERROR_BAD, sprintf("Could not connect to %s:%d: %s", $host, $this->prefs['port'], $errstr)); |
| | | return false; |
| | | } |
| | | |
| | | if ($this->prefs['timeout'] > 0) |
| | | if ($this->prefs['timeout'] > 0) { |
| | | stream_set_timeout($this->fp, $this->prefs['timeout']); |
| | | } |
| | | |
| | | $line = trim(fgets($this->fp, 8192)); |
| | | |