Table of Contents
π¦ Class \emailcatcher
/**
* =======================================================================
*
* PHP EMAIL CATCHER
* Read emails sent by mail() and browse them
*
* π€ Author: Axel Hahn, Institute for Medical Education, University of Bern
* π Source: <https://git-repo.iml.unibe.ch/iml-open-source/php-emailcatcher>
* π Docs: <https://os-docs.iml.unibe.ch/php-emailcatcher/>
* π License: GNU GPL 3.0
*
* ----------------------------------------------------------------------
* 2024-10-08 v0.1 initial version
* 2024-10-16 v0.2 detect parse error when reading email data
* =======================================================================
*/
πΆ Properties
(none)
π· Methods
πΉ public __construct()
Return: ``
Parameters: 0
πΉ public catchEmail()
Fetch email of a single email from stdin and store it.It returns the return value of file_put_contents().used in php-sendmail.php
Return: bool|int *
Parameters: 0
πΉ public getBody()
Get message body of the selected email
Return: mixed
Parameters: 0
πΉ public getEmail()
Get hash for a single email with all metadata and body
Return: array
Parameters: 1
Parameter | Type | Description |
---|---|---|
<optional> $sEmail2Show = ββ | optional: * |
optional: email id to show |
πΉ public getField()
Get a Meta value of the selected email
Return: mixed
Parameters: 1
Parameter | Type | Description |
---|---|---|
<required> string $sField | string |
πΉ public getHeader()
get message header of the selected email
Return: mixed
Parameters: 0
πΉ public readEmails()
Get a list of emails to render an inbox like selection.It doesnβt contain header and body - just metadata
Return: array
Parameters: 0
πΉ public setId()
Set a single email by id.It returns a bool for success: false = failed
Return: bool
Parameters: 1
Parameter | Type | Description |
---|---|---|
<required> string $sId | string |
πΉ public storeEmail()
Store a new email. It returns the return value of file_put_contents().
Return: int|bool
Parameters: 1
Parameter | Type | Description |
---|---|---|
<required> $sMaildata | maildata * |
maildata with header and body |
Generated with Axels PHP class doc parser.