API / Minn\Mail / DebugOutput

DebugOutput final class

Minn\Mail\DebugOutput · public/minn/src/Minn/Mail/DebugOutput.php · 38 lines

Where a mailer's debug text goes, as its Debugoutput setting names it: "echo" (a timestamp and a tab, continuation lines indented under the text), "html" (entity-escaped, line breaks dropped, ending in <br>), "error_log", a PSR-3 logger's debug(), or any other callable, which gets the text and its level. The two printed forms come back as text for the caller to print; the others are delivered here and return null.

Constants and properties

privateINDENT = ' '

Public

staticsmtp(mixed $how, string $text, int $level): ?string#

Debug text from the SMTP client: the text to print, or null once delivered; its html form carries a timestamp.

staticmailer(mixed $how, string $text, int $level): ?string#

Debug text from the mailer itself: the text to print, or null once delivered; its html form has no timestamp.

Internals 2

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatewrite(mixed $how, string $text, int $level): ?string#
privatehtml(string $text): string#