Skip to content
Corex

MailService

Corex\Email\MailService · class · Add-ons layer

Orchestrates a send: header-injection guard → recipient validation → deliver through the driver → record the outcome. Best-effort and non-fatal — a header rejection, an empty valid-recipient set, or a driver error each short-circuit with a logged result; the service never throws, so a triggering request or event dispatch is never aborted (spec FR-006, FR-007, FR-011).

__construct(MailDriver $driver, EmailLogStore $log, HeaderGuard $guard, BootLogger $logger, ?MailGate $gate, ?MailPath $paths)

Section titled “__construct(MailDriver $driver, EmailLogStore $log, HeaderGuard $guard, BootLogger $logger, ?MailGate $gate, ?MailPath $paths)”

deliver(EmailMessage $message): EmailResult

Section titled “deliver(EmailMessage $message): EmailResult”