Skip to content

Instantly share code, notes, and snippets.

@MrMaksimize
Created August 16, 2012 23:58
Show Gist options
  • Save MrMaksimize/3374643 to your computer and use it in GitHub Desktop.
Save MrMaksimize/3374643 to your computer and use it in GitHub Desktop.
<?php
$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'mailhandler_nodes';
$feeds_importer->config = array(
'name' => 'Mailhandler nodes',
'description' => 'Imports nodes from a Mailhandler mailbox',
'fetcher' => array(
'plugin_key' => 'MailhandlerFetcher',
'config' => array(
'filter' => 'MailhandlerFilters',
),
),
'parser' => array(
'plugin_key' => 'MailhandlerParser',
'config' => array(
'authenticate_plugin' => 'MailhandlerAuthenticateDefault',
'available_commands' => 'status',
),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'content_type' => 'imp_email',
'expire' => '-1',
'author' => 0,
'mappings' => array(
0 => array(
'source' => 'subject',
'target' => 'title',
'unique' => 0,
),
1 => array(
'source' => 'authenticated_uid',
'target' => 'uid',
'unique' => FALSE,
),
2 => array(
'source' => 'status',
'target' => 'status',
'unique' => FALSE,
),
3 => array(
'source' => 'body_text',
'target' => 'body',
'unique' => FALSE,
),
4 => array(
'source' => 'message_id',
'target' => 'guid',
'unique' => 1,
),
),
'update_existing' => '0',
'input_format' => 'plain_text',
),
),
'content_type' => '',
'update' => 0,
'import_period' => '-1',
'expire_period' => 3600,
'import_on_create' => 1,
'process_in_background' => 0,
);
<?php
$mailbox = new stdClass();
$mailbox->disabled = FALSE; /* Edit this to true to make a default mailbox disabled initially */
$mailbox->api_version = 2;
$mailbox->mail = 'max_maksimize';
$mailbox->admin_title = 'max_maksimize';
$mailbox->settings = array(
'type' => 'imap',
'folder' => 'INBOX',
'domain' => 'imap.gmail.com',
'port' => '993',
'name' => 'sgt3@gmail.com',
'pass' => 'P@Sw00rd',
'extraimap' => '/ssl',
'limit' => '10',
'encoding' => 'UTF-8',
'flag_after_read' => 1,
'delete_after_read' => 0,
'fromheader' => 'From',
'security' => '0',
'replies' => '1',
'retrieve' => 'MailhandlerPhpImapRetrieve',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment