_debug) { print "connecting to $host and authenticating as $username\n"; } $options = array('ssl' => $ssl); $this->_transport = new ezcMailPop3Transport($host, NULL, $options); $this->_transport->authenticate($username, $password); $this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, array('CiviMail.ignored', date('Y'), date('m'), date('d')))); $this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, array('CiviMail.processed', date('Y'), date('m'), date('d')))); } /** * Fetch the specified message to the local ignore folder * * @param integer $nr number of the message to fetch * * @return void */ function markIgnored($nr) { if ($this->_debug) { print "fetching message $nr and putting it in the ignored mailbox\n"; } $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_ignored); $parser = new ezcMailParser; $parser->parseMail($set); $this->_transport->delete($nr); } /** * Fetch the specified message to the local processed folder * * @param integer $nr number of the message to fetch * * @return void */ function markProcessed($nr) { if ($this->_debug) { print "fetching message $nr and putting it in the processed mailbox\n"; } $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_processed); $parser = new ezcMailParser; $parser->parseMail($set); $this->_transport->delete($nr); } }