diff --git a/modules/imap/functions.php b/modules/imap/functions.php index 3dd58c16b..96bc11c70 100644 --- a/modules/imap/functions.php +++ b/modules/imap/functions.php @@ -1518,9 +1518,11 @@ function parse_sieve_config_host($host) { $url = parse_url($host); $host = $url['host'] ?? $url['path']; $port = $url['port'] ?? '4190'; - $scheme = $url['scheme'] ?? 'tcp://'; + $scheme = $url['scheme'] ?? ''; $tls = $scheme === 'tls'; - // $host = '$scheme://'.$host; + if (!empty($scheme)) { + $host = $scheme . '://' . $host; + } return [$host, $port, $tls]; }} diff --git a/modules/smtp/hm-smtp.php b/modules/smtp/hm-smtp.php index b692449eb..40d78ab29 100644 --- a/modules/smtp/hm-smtp.php +++ b/modules/smtp/hm-smtp.php @@ -60,6 +60,9 @@ class Hm_SMTP { private $config; private $server; private $starttls; + private $supports_tls; + private $supports_auth; + private $max_message_size; private $port; private $tls; private $auth; @@ -411,7 +414,6 @@ function authenticate($username, $password, $mech) { break; } } - if (!isset($result)) { $result = 'An error occurred authenticating to the SMTP server'; $res = $this->get_response();