MailPath
Corex\Mail\Capture\MailPath · class · Core layer
The name of what is sending the email in progress, for the Email Studio log: “Form notification”, “Newsletter: new post”, “WordPress: password reset” (spec 113, research R4). CoreX code that sends wraps the send in {@see during()}; mail sent inside a name is CoreX’s own, which the “Capture only CoreX mail” switch reads. WordPress builds its own emails through filters that run just before wp_mail(), so a name can also be left for the next email ({@see next()}), which reads it once.
Public API
Section titled “Public API”during(string $name, callable $send): mixed
Section titled “during(string $name, callable $send): mixed”current(): ?string
Section titled “current(): ?string”The innermost name in force, or null when no CoreX code is sending.
next(string $name): void
Section titled “next(string $name): void”Name the next email, which is not CoreX’s own (WordPress core mail).
takeNext(): ?string
Section titled “takeNext(): ?string”The name left for this email, once: a second email is not named by it.