/** * connect to nntp server for a newsgroup * * @since 0.1 * @access public * @return bool * @param string $host mail server * @param string $user * @param string $password * @param string $newsgroup name of newsgroup * @param int $secure level * @param int $port=null * @throws MailException */ public function connect($host, $user, $password, $newsgroup, $secure = MailReader::SSL_NONE, $port = null) { $type = 'nntp'; if ($port === null) { $port = $this->_getPort($secure, 119); } try { $result = parent::connect($host, $user, $password, $type, $newsgroup, $port, $secure); } catch (MailException $e) { throw $e; } }
/** * connect to a pop3 server * * @since 0.1 * @access public * @return bool * @param string $host mail server * @param string $user * @param string $password * @param int $secure level * @param int $port=null * @throws MailException */ public function connect($host, $user, $password, $secure = MailReader::SSL_NONE, $port = null) { $type = 'pop3'; $mailbox = 'INBOX'; if ($port === null) { $port = $this->_getPort($secure, 110); } try { $result = parent::connect($host, $user, $password, $type, $mailbox, $port, $secure); } catch (MailException $e) { throw $e; } }