/** * Check system prefs and/or hooks to determine if we are allowed to send. * * @return boolean True if able to send otherwise false. */ protected function _sysCheck() { // Check existence of API method needed. if (!$this->_connector->horde_hasMethod('mdnSend', 'mail')) { return false; } // @todo Other checks? return true; }
/** * Return the last verb executed for the specified Message-ID. * * @param string $mid The Message-ID. * * @return array The most recent history log entry array for $mid. */ protected function _getLastVerb($mid) { if (!array_key_exists($mid, $this->_verbs)) { $log = $this->_connector->mail_getMaillog($mid); $last = array(); foreach ($log as $entry) { if (empty($last) || $last['ts'] < $entry['ts']) { $last = $entry; } } $this->_verbs[$mid] = $last; } $this->_logger->info(sprintf('[%s] Fetching verb for %s.', $this->_pid, $mid)); return $this->_verbs[$mid]; }
/** * Return the last verb executed for the specified Message-ID. * * @param string $mid The Message-ID. * * @return array The most recent history log entry array for $mid. */ protected function _getLastVerb($mid) { if (!array_key_exists($mid, $this->_verbs)) { $this->_logger->info('FETCHING VERB'); $log = $this->_connector->mail_getMaillog($mid); $last = array(); foreach ($log as $entry) { if (empty($last) || $last['ts'] < $entry['ts']) { $last = $entry; } } $this->_verbs[$mid] = $last; } $this->_logger->info('RETURNING VERB'); return $this->_verbs[$mid]; }