Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core\test\mailpit_email_catcher Class Reference

Mailpit email handling class. More...

Inheritance diagram for core\test\mailpit_email_catcher:
core\test\email_catcher

Public Member Functions

 __construct (string $baseuri)
 Constructor.
 
 delete_all ()
 Delete all messages from the mailpit server.
 
 get_message_data (string $id)
 Get the message summary for a specific message.
 
 get_messages (bool $showdetails=false)
 Get a list of messages from the mailpit server.
 
 reset_after_test ()
 Reset the mailpit server after a test.
 
 search (string $query)
 Search for a message in the mailpit server.
 

Protected Attributes

http_client http_client $httpclient
 The http client object.
 

Detailed Description

Mailpit email handling class.

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

Constructor & Destructor Documentation

◆ __construct()

core\test\mailpit_email_catcher::__construct ( string $baseuri)

Constructor.

Parameters
string$baseuriThe base uri for the mailpit server.

Member Function Documentation

◆ delete_all()

core\test\mailpit_email_catcher::delete_all ( )

Delete all messages from the mailpit server.

Implements core\test\email_catcher.

◆ get_message_data()

core\test\mailpit_email_catcher::get_message_data ( string $id)

Get the message summary for a specific message.

Parameters
string$idThe message id.
Return values
stdClass

◆ get_messages()

core\test\mailpit_email_catcher::get_messages ( bool $showdetails = false)

Get a list of messages from the mailpit server.

Parameters
bool$showdetailsOptional. Whether to include detailed information in the messages. Default is false.
Return values
iterable

Implements core\test\email_catcher.

◆ search()

core\test\mailpit_email_catcher::search ( string $query)

Search for a message in the mailpit server.

Parameters
string$queryThe search query.
Return values
mixed

Implements core\test\email_catcher.


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