Retrieve messages using PHP IMAP library. More...
Public Member Functions | |
retrieve () | |
test () | |
Test connection to a mailbox. More... | |
purge_message ($message) | |
mark message for deletion More... | |
open_mailbox () | |
Establish IMAP stream connection to specified mailbox. More... | |
mailbox_string () | |
Constructs a mailbox string based on mailbox object. More... | |
get_part ($stream, $msg_number, $mime_type, $structure=FALSE, $part_number=FALSE, $encoding) | |
Returns the first part with the specified mime_type. More... | |
get_parts ($stream, $msg_number, $max_depth=10, $depth=0, $structure=FALSE, $part_number=1) | |
Returns an array of parts as file objects. More... | |
get_mime_type (&$structure) | |
Retrieve MIME type of the message structure. More... | |
get_unread_messages ($result) | |
Obtain the number of unread messages for an imap stream. More... | |
retrieve_message ($result, $msg_number) | |
Retrieve individual messages from an IMAP result. More... | |
close_mailbox ($result) | |
Close a mailbox. More... | |
fetch_uid ($msg_number) | |
Fetch UID for a message in a POP mailbox. More... | |
ctools_export_ui | |
edit_form (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form(). More... | |
edit_form_validate (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form_validate(). More... | |
edit_form_submit (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form_submit(). More... | |
MailinglistRetrieveInterface | |
get_message_list ($max=0) | |
Returns a list of messages that are available. More... | |
Public Member Functions inherited from MailinglistRetrieve | |
test () | |
Test connection. More... | |
get_message_list ($max=0) | |
Returns a list of messages that are available. More... | |
get_message ($id) | |
Get an email message by its id code (what is returned by get_message_list() More... | |
purge_message ($id) | |
mark message for deletion More... | |
close () | |
delete marked messages and close connection More... | |
edit_form (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form(). More... | |
edit_form_validate (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form_validate(). More... | |
edit_form_submit (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form_submit(). More... | |
Public Member Functions inherited from MailinglistExportable | |
get_setting ($name, $def=NULL) | |
get_settings() More... | |
created () | |
created() More... | |
edited ($old) | |
edited() More... | |
changedType (MailinglistPolymorpicExportableInterface $old) | |
changedType() More... | |
delete () | |
delete() More... | |
baseName () | |
baseName() More... | |
edit_form (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form() called via mailinglist_export_ui Build an edit form for our object. More... | |
edit_form_validate (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form_validate(). More... | |
edit_form_submit (&$form, &$form_state) | |
Implements ctools_export_ui::edit_form_submit(). More... | |
log ($str, $level=self::LOG_NOTICE, $parms=array()) | |
log() More... | |
log_screen ($str, $parms=array(), $level=self::LOG_NOTICE) | |
log_screen() More... | |
log_db ($str, $parms=array(), $level=self::LOG_ERROR) | |
log_db(). More... | |
log_file ($str, $parms=array(), $level=self::LOG_INFO) | |
log_file(). More... | |
MailinglistPolymorphicExportableInterface | |
MailinglistRetrieveInterface |
Additional Inherited Members | |
Data Fields inherited from MailinglistExportable | |
$object_type | |
The type of object we are. More... | |
$settings | |
Generic Array to hold misc settings so all can use same schema. More... | |
$export_type | |
Needed by CTools. More... | |
const | LOG_OFF = 0 |
const | LOG_SCREEN = 1 |
const | LOG_DB = 2 |
const | LOG_DB_SCREEN = 3 |
const | LOG_FILE = 4 |
const | LOG_FILE_SCREEN = 5 |
const | LOG_DEBUG = WATCHDOG_DEBUG |
const | LOG_INFO = WATCHDOG_INFO |
const | LOG_NOTICE = WATCHDOG_NOTICE |
const | LOG_WARNING = WATCHDOG_WARNING |
const | LOG_ERROR = WATCHDOG_ERROR |
const | LOG_CRITICAL = WATCHDOG_CRITICAL |
const | LOG_ALERT = WATCHDOG_ALERT |
const | LOG_EMERGENCY = WATCHDOG_EMERGENCY |
$logging_screen = self::LOG_DEBUG | |
$logging_db = self::LOG_INFO | |
$logging_file = self::LOG_DEBUG | |
Retrieve messages using PHP IMAP library.
Definition at line 10 of file MailinglistPhpImapRetrieve.class.php.
close_mailbox | ( | $result | ) |
Close a mailbox.
Definition at line 539 of file MailinglistPhpImapRetrieve.class.php.
Referenced by purge_message(), retrieve(), and test().
edit_form | ( | & | $form, |
& | $form_state | ||
) |
Implements ctools_export_ui::edit_form().
called via mailinglist_export_ui
Definition at line 20 of file MailinglistPhpImapRetrieve.class.php.
References _mailinglist_decode_password(), and MailinglistExportable\get_setting().
edit_form_submit | ( | & | $form, |
& | $form_state | ||
) |
Implements ctools_export_ui::edit_form_submit().
Called via mailinglist_export_ui.
Definition at line 131 of file MailinglistPhpImapRetrieve.class.php.
edit_form_validate | ( | & | $form, |
& | $form_state | ||
) |
Implements ctools_export_ui::edit_form_validate().
Called via mailinglist_export_ui.
Definition at line 115 of file MailinglistPhpImapRetrieve.class.php.
fetch_uid | ( | $msg_number | ) |
Fetch UID for a message in a POP mailbox.
Taken from PHP.net.
Definition at line 549 of file MailinglistPhpImapRetrieve.class.php.
Referenced by retrieve_message().
get_message_list | ( | $max = 0 | ) |
Returns a list of messages that are available.
Implements MailinglistRetrieveInterface.
Definition at line 147 of file MailinglistPhpImapRetrieve.class.php.
get_mime_type | ( | & | $structure | ) |
Retrieve MIME type of the message structure.
Definition at line 462 of file MailinglistPhpImapRetrieve.class.php.
Referenced by get_part().
get_part | ( | $stream, | |
$msg_number, | |||
$mime_type, | |||
$structure = FALSE , |
|||
$part_number = FALSE , |
|||
$encoding | |||
) |
Returns the first part with the specified mime_type.
USAGE EXAMPLES - from php manual: imap_fetch_structure() comments $data = get_part($stream, $msg_number, "TEXT/PLAIN"); // get plain text $data = get_part($stream, $msg_number, "TEXT/HTML"); // get HTML text
Definition at line 300 of file MailinglistPhpImapRetrieve.class.php.
References get_mime_type().
Referenced by retrieve_message().
get_parts | ( | $stream, | |
$msg_number, | |||
$max_depth = 10 , |
|||
$depth = 0 , |
|||
$structure = FALSE , |
|||
$part_number = 1 |
|||
) |
Returns an array of parts as file objects.
$stream | Handle to stream to fetch the message from |
$msg_number | message number to retreive. |
$max_depth | Maximum Depth to recurse into parts. |
$depth | The current recursion depth. |
$structure | A message structure, usually used to recurse into specific parts |
$part_number | A message part number to track position in a message during recursion. |
Definition at line 359 of file MailinglistPhpImapRetrieve.class.php.
Referenced by retrieve_message().
get_unread_messages | ( | $result | ) |
Obtain the number of unread messages for an imap stream.
$result | IMAP stream - as opened by imap_open |
Definition at line 479 of file MailinglistPhpImapRetrieve.class.php.
Referenced by retrieve().
mailbox_string | ( | ) |
Constructs a mailbox string based on mailbox object.
Definition at line 280 of file MailinglistPhpImapRetrieve.class.php.
Referenced by open_mailbox(), and test().
open_mailbox | ( | ) |
Establish IMAP stream connection to specified mailbox.
Definition at line 254 of file MailinglistPhpImapRetrieve.class.php.
References mailbox_string().
Referenced by purge_message(), retrieve(), and test().
purge_message | ( | $id | ) |
mark message for deletion
Implements MailinglistRetrieveInterface.
Definition at line 228 of file MailinglistPhpImapRetrieve.class.php.
References close_mailbox(), MailinglistExportable\log(), and open_mailbox().
retrieve | ( | ) |
Definition at line 166 of file MailinglistPhpImapRetrieve.class.php.
References close_mailbox(), get_unread_messages(), open_mailbox(), and retrieve_message().
retrieve_message | ( | $result, | |
$msg_number | |||
) |
Retrieve individual messages from an IMAP result.
$result | IMAP stream. |
$msg_number | IMAP message number. |
Definition at line 501 of file MailinglistPhpImapRetrieve.class.php.
References fetch_uid(), get_part(), and get_parts().
Referenced by retrieve().
test | ( | ) |
Test connection to a mailbox.
Implements MailinglistRetrieveInterface.
Definition at line 196 of file MailinglistPhpImapRetrieve.class.php.
References close_mailbox(), mailbox_string(), and open_mailbox().