You are here

public function MailhandlerImportBatch::getRaw in Mailhandler 6.2

Implementation of FeedsImportBatch::getRaw();

Overrides FeedsImportBatch::getRaw

File

plugins/feeds/plugins/MailhandlerFetcher.class.php, line 27
Checks for new messages in a mailbox (IMAP, POP3, etc...).

Class

MailhandlerImportBatch
Definition of the import batch object needed by MailhandlerFetcher.

Code

public function getRaw() {
  $mailbox = mailhandler_mailbox_load($this->mailbox_name);
  if ($class = mailhandler_plugin_load_class('mailhandler', $mailbox->settings['retrieve'], 'retrieve', 'handler')) {
    if ($messages = $class
      ->retrieve($mailbox, $this->filter)) {
      return array(
        'messages' => $messages,
        'mailbox' => $mailbox,
      );
    }
  }
}