', 'Content-Type: text/html; charset=UTF-8', ]; } private function do_send(string $to, string $subject, string $body): void { $success = wp_mail($to, $subject, $body, $this->headers()); if (!$success) { throw new \RuntimeException('wp_mail failed for ' . $to); } } public function send(string $to, string $subject, string $body): void { $this->do_send($to, $subject, $body); } }