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).
Constants and properties
| const | GUARD = '<?php return; ?> ' | The first line of the file: PHP that returns before the rest is sent. |
Public
| static | forSite(): string# | The site's log file. | |||
| static | read(string $file): array# | The messages a log file holds, oldest first (its guard line aside). @return list<array<string, mixed>> | |||
| static | write(string $file, string $from, string $fromName, array $to, string $subject, string $body): bool# | Appends one message; false when the file cannot be written.
|
Nothing matches.