Retrieve messages using PHP IMAP library. More...
Public Member Functions | |
__destruct () | |
Destructor. 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) | |
Overrides/Implements Mailinglist:Retrieve::get_message_list Connect to mailbox and run message retrieval. More... | |
get_message ($id) | |
Overrides/Implements MailinglistRetrieve::get_message(). More... | |
purge_message ($id) | |
Overrides/Implements MailinglistRetrieve::purge_message();. More... | |
close () | |
Overrides/Implements MailinglistRetrieve::close(). 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 |
Data Fields | |
const | DEFAULT_BUFFER_SIZE = 4096 |
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 | |
Protected Member Functions | |
connect () | |
connect() More... | |
disconnect () | |
getOfficeStatus ($limit=0) | |
Get the office status. More... | |
get_uidls () | |
get_uidls() More... | |
get_list () | |
get_list() More... | |
get_stat () | |
Get the stats from the pop3 server This is only a string with the count of mails and their size in your mail drop. More... | |
delete_msg ($msg_num) | |
quit () | |
Send the quit command to the server. More... | |
get_msg ($msg_num) | |
Recieve a raw message. More... | |
recv_string ($buff_size=self::DEFAULT_BUFFER_SIZE, $log=TRUE) | |
recv_string More... | |
recv_to_point () | |
recv_to_point More... | |
send ($cmd) | |
Send a string to the server. More... | |
send_cmd ($cmd) | |
This function send the command to the server and will get the response If the command goes failed, the function will throw the POP3_Exception with the ERR_SEND_CMD error code and the response as error message. More... | |
Private Attributes | |
$connected = FALSE | |
Are we currently connected/logged in. More... | |
$socket | |
Handle for Socket being used. More... | |
$ipaddr | |
String for ipaddr we are connecting to. More... | |
$apop_banner = NULL | |
Banner for APOP. More... | |
Retrieve messages using PHP IMAP library.
Definition at line 10 of file MailinglistPop3Retrieve.class.php.
__destruct | ( | ) |
Destructor.
Definition at line 225 of file MailinglistPop3Retrieve.class.php.
References disconnect().
close | ( | ) |
Overrides/Implements MailinglistRetrieve::close().
Implements MailinglistRetrieveInterface.
Definition at line 204 of file MailinglistPop3Retrieve.class.php.
References disconnect(), and quit().
|
protected |
Build connection/log in to Pop3 server.
Definition at line 235 of file MailinglistPop3Retrieve.class.php.
References $connected, _mailinglist_decode_password(), MailinglistExportable\log(), recv_string(), and send_cmd().
Referenced by get_list(), get_message_list(), get_stat(), get_uidls(), and getOfficeStatus().
|
protected |
Definition at line 434 of file MailinglistPop3Retrieve.class.php.
References send_cmd().
Referenced by purge_message().
|
protected |
Definition at line 322 of file MailinglistPop3Retrieve.class.php.
References MailinglistExportable\log().
Referenced by __destruct(), and close().
edit_form | ( | & | $form, |
& | $form_state | ||
) |
Implements ctools_export_ui::edit_form().
called via mailinglist_export_ui
Definition at line 21 of file MailinglistPop3Retrieve.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 151 of file MailinglistPop3Retrieve.class.php.
edit_form_validate | ( | & | $form, |
& | $form_state | ||
) |
Implements ctools_export_ui::edit_form_validate().
Called via mailinglist_export_ui.
Definition at line 130 of file MailinglistPop3Retrieve.class.php.
|
protected |
Get list of messages on server, and their size
Definition at line 398 of file MailinglistPop3Retrieve.class.php.
References connect(), recv_to_point(), and send_cmd().
Referenced by getOfficeStatus().
get_message | ( | $id | ) |
Overrides/Implements MailinglistRetrieve::get_message().
Implements MailinglistRetrieveInterface.
Definition at line 188 of file MailinglistPop3Retrieve.class.php.
References get_msg().
get_message_list | ( | $max = 0 | ) |
Overrides/Implements Mailinglist:Retrieve::get_message_list Connect to mailbox and run message retrieval.
Implements MailinglistRetrieveInterface.
Definition at line 170 of file MailinglistPop3Retrieve.class.php.
References connect(), and get_stat().
|
protected |
Recieve a raw message.
$msg_num | The message number on the pop3 server. |
Definition at line 457 of file MailinglistPop3Retrieve.class.php.
References recv_to_point(), and send_cmd().
Referenced by get_message().
|
protected |
Get the stats from the pop3 server This is only a string with the count of mails and their size in your mail drop.
POP3_Exception |
Definition at line 415 of file MailinglistPop3Retrieve.class.php.
References connect(), and send_cmd().
Referenced by get_message_list(), and getOfficeStatus().
|
protected |
Get list of message uidls
Definition at line 383 of file MailinglistPop3Retrieve.class.php.
References connect(), recv_to_point(), and send_cmd().
Referenced by getOfficeStatus().
|
protected |
Get the office status.
That means that you will get an array with all needed informations about your mail drop. The array is build up like discribed here.
$result = array( "count" => "Count of messages in your mail drop", "octets" => "Size of your mail drop in bytes",
"msg_number" => array("uid" => "The unique id of the message on the pop3 server", "octets" => "The size of the message in bytes" ), "and soon" );
Definition at line 354 of file MailinglistPop3Retrieve.class.php.
References connect(), get_list(), get_stat(), and get_uidls().
purge_message | ( | $id | ) |
Overrides/Implements MailinglistRetrieve::purge_message();.
Implements MailinglistRetrieveInterface.
Definition at line 196 of file MailinglistPop3Retrieve.class.php.
References delete_msg().
|
protected |
Send the quit command to the server.
All as delete marked messages will remove from the mail drop.
Definition at line 444 of file MailinglistPop3Retrieve.class.php.
References send_cmd().
Referenced by close().
|
protected |
recv_string
Receive a string from the socket.
$buff_size | [int] the size of the buffer to read. |
$log | [bool] should the data received be logged. |
Definition at line 470 of file MailinglistPop3Retrieve.class.php.
References MailinglistExportable\log().
Referenced by connect(), recv_to_point(), and send_cmd().
|
protected |
recv_to_point
Read from socket until we reach a line with just a period on it. Return all the lines (but the .) with new-line between each.
Definition at line 511 of file MailinglistPop3Retrieve.class.php.
References recv_string().
Referenced by get_list(), get_msg(), and get_uidls().
|
protected |
Send a string to the server.
Will append the network lineend "\r\n".
$cmd | [string] The string that should send to the pop3 server |
Definition at line 531 of file MailinglistPop3Retrieve.class.php.
References MailinglistExportable\log().
Referenced by send_cmd().
|
protected |
This function send the command to the server and will get the response If the command goes failed, the function will throw the POP3_Exception with the ERR_SEND_CMD error code and the response as error message.
$cmd | [string] The string with the command for the pop3 server |
Definition at line 554 of file MailinglistPop3Retrieve.class.php.
References MailinglistExportable\log(), recv_string(), and send().
Referenced by connect(), delete_msg(), get_list(), get_msg(), get_stat(), get_uidls(), and quit().
|
private |
Banner for APOP.
Definition at line 219 of file MailinglistPop3Retrieve.class.php.
|
private |
Are we currently connected/logged in.
Definition at line 216 of file MailinglistPop3Retrieve.class.php.
Referenced by connect().
|
private |
String for ipaddr we are connecting to.
Definition at line 218 of file MailinglistPop3Retrieve.class.php.
|
private |
Handle for Socket being used.
Definition at line 217 of file MailinglistPop3Retrieve.class.php.
const DEFAULT_BUFFER_SIZE = 4096 |
Definition at line 214 of file MailinglistPop3Retrieve.class.php.