Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
tool_messageinbound\manager Class Reference

Mail Pickup Manager. More...

Public Member Functions

 pickup_messages ()
 Execute the main Inbound Message pickup task. More...
 
 process_existing_message (\stdClass $maildata)
 Process a message received and validated by the Inbound Message processor. More...
 
 process_message (Horde_Imap_Client_Data_Fetch $message, $viewreadmessages=false, $skipsenderverification=false)
 Process a message and pass it through the Inbound Message handling systems. More...
 
 tidy_old_messages ()
 Tidy up old messages in the confirmation folder. More...
 
 tidy_old_verification_failures ()
 Remove older verification failures. More...
 

Public Attributes

string const CONFIRMATIONFOLDER = 'tobeconfirmed'
 The mailbox to store messages in when they are awaiting confirmation.
 
string const MAILBOX = 'INBOX'
 The main mailbox to check.
 
string const MESSAGE_DELETED = '\deleted'
 The flag for deleted messages.
 
string const MESSAGE_FLAGGED = '\flagged'
 The flag for flagged messages.
 
string const MESSAGE_SEEN = '\seen'
 The flag for seen/read messages.
 

Protected Member Functions

 close_connection ()
 Shutdown and close the connection to the IMAP client.
 
 get_confirmation_folder ()
 Get the confirmation folder imap name. More...
 
 get_imap_client ()
 Retrieve the connection to the IMAP client. More...
 
 get_mailbox ()
 Get the current mailbox information. More...
 

Protected Attributes

core message inbound address_manager $addressmanager = null
 A reference to the Inbound Message Address Manager instance.
 
Horde_Imap_Client_Socket $client = null
 A reference to the IMAP client.
 
stdClass $currentmessagedata = null
 The data for the current message being processed.
 
string $imapnamespace = null
 IMAP folder namespace.
 

Detailed Description

Mail Pickup Manager.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_confirmation_folder()

tool_messageinbound\manager::get_confirmation_folder ( )
protected

Get the confirmation folder imap name.

Return values
string

◆ get_imap_client()

tool_messageinbound\manager::get_imap_client ( )
protected

Retrieve the connection to the IMAP client.

Return values
boolWhether a connection was successfully established.

◆ get_mailbox()

tool_messageinbound\manager::get_mailbox ( )
protected

Get the current mailbox information.

Return values
Horde_Imap_Client_Mailbox
Exceptions
core

◆ pickup_messages()

tool_messageinbound\manager::pickup_messages ( )

Execute the main Inbound Message pickup task.

Return values
bool

◆ process_existing_message()

tool_messageinbound\manager::process_existing_message ( \stdClass  $maildata)

Process a message received and validated by the Inbound Message processor.

Parameters
stdClass$maildataThe data retrieved from the database for the current record.
Return values
boolWhether the message was successfully processed.
Exceptions
core

◆ process_message()

tool_messageinbound\manager::process_message ( Horde_Imap_Client_Data_Fetch  $message,
  $viewreadmessages = false,
  $skipsenderverification = false 
)

Process a message and pass it through the Inbound Message handling systems.

Parameters
Horde_Imap_Client_Data_Fetch$messageThe message to process
bool$viewreadmessagesWhether to also look at messages which have been marked as read
bool$skipsenderverificationWhether to skip the sender verification stage

◆ tidy_old_messages()

tool_messageinbound\manager::tidy_old_messages ( )

Tidy up old messages in the confirmation folder.

Return values
boolWhether tidying occurred successfully.

◆ tidy_old_verification_failures()

tool_messageinbound\manager::tidy_old_verification_failures ( )

Remove older verification failures.

Return values
void

The documentation for this class was generated from the following file: