diff --git a/imp/lib/Imap.php b/imp/lib/Imap.php index 34712615d1c..44e1694bf28 100644 --- a/imp/lib/Imap.php +++ b/imp/lib/Imap.php @@ -37,6 +37,7 @@ * a user can create. * @property-read string $server_key Server key used to login. * @property-read string $thread_algo The threading algorithm to use. + * @property-read Horde_Imap_Client_Url $url A URL object. */ class IMP_Imap implements Serializable { @@ -165,6 +166,15 @@ public function __get($key) $this->_changed = true; return $thread; + + case 'url': + $url = new Horde_Imap_Client_Url(); + if ($this->init) { + $url->hostspec = $this->getParam('hostspec'); + $url->port = $this->getParam('port'); + $url->protocol = $this->isImap() ? 'imap' : 'pop'; + } + return $url; } }