Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
tool_messageinbound\manager Class Reference

Mail Pickup Manager. More...

Public Member Functions

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

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.
 
 get_imap_client ()
 Retrieve the connection to the IMAP client.
 
 get_mailbox ()
 Get the current mailbox information.
 

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\message\inbound\processing_failed_exceptionif the mailbox could not be opened.

◆ 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\message\inbound\processing_failed_exceptionif the message cannot be found.

◆ 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: