API / Minn\Mail / MailLog

MailLog final class

Minn\Mail\MailLog · public/minn/src/Minn/Mail/MailLog.php · 45 lines

The engine's development transport: each message as one JSON line (time, from, to, subject, body) appended to wp-content/minn-mail.log.php, nothing sent. The file opens with a line that returns from any request for it, so a web server that runs PHP never serves the reset links it holds (audit Low: it was a plain .log under the webroot).

Uses 1
Used by 1

Constants and properties

constGUARD = '<?php return; ?> '

The first line of the file: PHP that returns before the rest is sent.

Public

staticforSite(): string#

The site's log file.

staticread(string $file): array#

The messages a log file holds, oldest first (its guard line aside).

@return list<array<string, mixed>>
staticwrite(string $file, string $from, string $fromName, array $to, string $subject, string $body): bool#

Appends one message; false when the file cannot be written.

$tolist<string>