/** * Get imap configuration */ private function _getConfig() { $config = ConfigHelper::getImapConfig(); $this->hostname = $config->imap_host; $this->username = $config->imap_user; $this->password = $config->imap_pass; // Validate config if (strlen($this->hostname) == 0 || strlen($this->username) == 0 || strlen($this->password) == 0) { return false; } else { return true; } }