πŸ“¦ 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.